T currentState

The state for the unique inflated instance of this widget.

Might be null if the widget is not currently in the tree.

Source

T get currentState {
  GlobalKey<T> globalKey = key;
  return globalKey.currentState;
}