state property

  1. @override
TState get state
override

A typed state object corresponding to the current untyped state Map (unwrappedState).

Created using typedStateFactory and cached for each Map instance.

Implementation

@override
TState get state {
  var unwrappedState = this.unwrappedState;
  var typedState = _typedStateCache[unwrappedState];
  if (typedState == null) {
    typedState = typedStateFactory(inReactDevMode ? _WarnOnModify(unwrappedState, false) : unwrappedState);
    _typedStateCache[unwrappedState] = typedState;
  }
  return typedState;
}
  1. @override
set state (Map value)
override

Equivalent to setting unwrappedState, but needed by react-dart to effect state changes.

Implementation

@override
set state(Map value) => super.state = value;