refresh method

  1. @override
void refresh()
override

Refresh the most 'recent' app. This is to address the possibility an App has called another App.

Implementation

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