state property Null safety

State<StatefulWidget> state

The State object that this property is registered with.

Must only be called when isRegistered is true.

Implementation

@protected
State get state {
  assert(isRegistered);
  assert(_debugAssertNotDisposed());
  return _owner!;
}