state property Null safety

State<StatefulWidget> state
protected">@protected

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(ChangeNotifier.debugAssertNotDisposed(this));
  return _owner!;
}