Skip to content

AppLifecycleTriggerExecutor

Runs an AppLifecycleTrigger: fires when the app enters a listed state.

The states are the trigger's AppLifecycleStates.

Inheritance
Mixed-in types

Constructors

AppLifecycleTriggerExecutor

AppLifecycleTriggerExecutor()

Methods

didChangeAppLifecycleState

void didChangeAppLifecycleState(
  1. AppLifecycleState state
)
override

Called when the system puts the app in the background or returns the app to the foreground.

An example of implementing this method is provided in the class-level documentation for the WidgetsBindingObserver class.

This method exposes notifications from SystemChannels.lifecycle.

See also:

onPause

Future<bool> onPause()
override

Called by pause. Returns true if successfully paused.

If false, the state is not changed.

onResume

Future<bool> onResume()
override

Called by resume. Returns true if successfully resumed.

If false, the executor moves to ExecutorState.PausedButShouldBeResumed.