GlobalStateKey<T extends State<StatefulComponent>> class

A global key that provides access to the State that is associated with its element.

See also:

  • GlobalKey, which is a key that is unique across the entire app.
  • GlobalNodeKey, which is a key that provides access to the dom web.Node that is associated with its element.
  • The discussion at Component.key for more information about how components use keys.
Inheritance

Constructors

GlobalStateKey({String? debugLabel})
factory
GlobalStateKey.constructor()
Creates a global state key without a label.
const

Properties

currentComponent → Component?
The component in the tree that currently has this global key.
no setterinherited
currentContext → BuildContext?
The build context in which the component with this key builds.
no setterinherited
currentState → T?
The State for the component in the tree that currently has this global 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