setState method

  1. @override
void setState(
  1. VoidCallback fn
)
override

Calls the State object's setState() function if not (see class SetState).

Implementation

@override
void setState(VoidCallback fn) {
  // Don't if already in the SetState.builder() function
  if (!_inSetStateBuilder) {
    // If not called by the buildInherited() function
    if (mounted && !_buildInherited) {
      _inheritedStatefulWidget?.state.child = buildIn(context);
      super.setState(() {});
    }
  }
}