GlobalKey<T extends State<StatefulWidget>> constructor Null safety

GlobalKey<T extends State<StatefulWidget>>(
  1. {String? debugLabel}
)

Creates a LabeledGlobalKey, which is a GlobalKey with a label used for debugging.

The label is purely for debugging and not used for comparing the identity of the key.

Implementation

factory GlobalKey({ String? debugLabel }) => LabeledGlobalKey<T>(debugLabel);