onRestart method

  1. @protected
void onRestart()

Called when the widget becomes visible again after being stopped. Use this to:

  • Restore saved state
  • Refresh data
  • Reinitialize components
  • Reconnect to services

Example:

@override
void onRestart() {
  super.onRestart();
  _restoreSavedState();
  _refreshData();
  _reinitializeComponents();
  _reconnectServices();
}

Implementation

@protected
void onRestart() {}