withState method

void withState(
  1. State<StatefulWidget> state
)
inherited

Record the State object to its StatefulWidget using widget.withState(this);

Implementation

void withState(State state) {
  // Don't add more than one.
  if (_stateSet.isEmpty) {
    _stateSet.add(state);
  }
}