refresh method

void refresh()

Rebuild the 'latest/current' State object and the 'root/first' State object This is to address the possibility an App has called another v.App.

Implementation

void refresh() {
  _AppState? state;
  if (_AppState._appInApp) {
    state = lastContext?.findAncestorStateOfType<_AppState>();
  }
  if (state == null) {
    lastState?.setState(() {});
    // Refresh the 'root' State object.
    super.setState(() {});
  } else {
    state.setState(() {});
  }
}