onActive method

  1. @override
void onActive()
override

Called when this screen becomes the topmost visible screen in the router. Fires once after push, and again whenever it becomes topmost after a screen above it pops or hides, or its shell shows it. Always paired with a later onInactive.

Implementation

@override
void onActive() {
  super.onActive();
  _active = true;
  _publish();
}