handleAppLifecycleStateChanged method Null safety
- AppLifecycleState state
mustCallSuper">@mustCallSuperprotected">@protected
Called when the application lifecycle state changes.
Notifies all the observers using WidgetsBindingObserver.didChangeAppLifecycleState.
This method exposes notifications from SystemChannels.lifecycle.
Implementation
@protected
@mustCallSuper
void handleAppLifecycleStateChanged(AppLifecycleState state) {
assert(state != null);
_lifecycleState = state;
switch (state) {
case AppLifecycleState.resumed:
case AppLifecycleState.inactive:
_setFramesEnabledState(true);
break;
case AppLifecycleState.paused:
case AppLifecycleState.detached:
_setFramesEnabledState(false);
break;
}
}