GlobalKey<T extends State<StatefulWidget> > class
A key that is unique across the entire element tree. Global keys allow widgets to be uniquely identified and retrieved from the registry.
Constructors
- GlobalKey()
-
Initializes a global key.
const
Properties
- currentContext → BuildContext?
-
Retrieves the BuildContext / Element registered with this key.
no setter
- currentState → T?
-
Retrieves the current State associated with the widget registered with this key.
no setter
- currentWidget → Widget?
-
Retrieves the Widget configuration registered with this key.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited