reassemble method

  1. @protected
  2. @override
  3. @mustCallSuper
void reassemble()
inherited

During development, if a hot reload occurs, the reassemble method is called. This provides an opportunity to reinitialize any data that was prepared in the initState method.

Implementation

@protected
@override
@mustCallSuper
void reassemble() {
  /// No 'setState()' functions are allowed to fully function at this point.
  _rebuildAllowed = false;
  for (final listener in _beforeList) {
    listener.reassemble();
  }
  for (final con in _controllerList) {
    // This state's association is severed.
//      con._popState(this);

    con.reassemble();
  }
  for (final listener in _afterList) {
    listener.reassemble();
  }
  super.reassemble();
  _rebuildAllowed = true;

  /// No 'setState()' function is necessary
  /// The framework always calls build with a hot reload.
  _rebuildRequested = false;
}