GlobalKey<T extends State<StatefulWidget>> class
A key that is unique across the entire app.
Widgets that have global keys reparent their subtrees when they are moved from one location in the tree to another location in the tree. In order to reparent its subtree, a widget must arrive at its new location in the tree in the same animation frame in which it was removed from its old location in the tree.
You cannot simultaneously include two widgets in the tree with the same global key. Attempting to do so will assert at runtime.
See also the discussion at Widget.key.
- currentContext → BuildContext
The build context in which the widget with this key builds. [...]
- currentState → T
The State for the widget in the tree that currently has this global key. [...]
- currentWidget → Widget
The widget in the tree that currently has this global key. [...]
- hashCode → int
The hash code for this object. [...]
- runtimeType → Type
A representation of the runtime type of the object.