AppLifecycleState enum Null safety

States that an application can be in.

The values below describe notifications from the operating system. Applications should not expect to always receive all possible notifications. For example, if the users pulls out the battery from the device, no notification will be sent before the application is suddenly terminated, along with the rest of the operating system.

See also:

Inheritance

Constructors

AppLifecycleState()
const

Values

resumed → const AppLifecycleState

The application is visible and responding to user input.

AppLifecycleState()
inactive → const AppLifecycleState

The application is in an inactive state and is not receiving user input.

On iOS, this state corresponds to an app or the Flutter host view running in the foreground inactive state. Apps transition to this state when in a phone call, responding to a TouchID request, when entering the app switcher or the control center, or when the UIViewController hosting the Flutter app is transitioning.

On Android, this corresponds to an app or the Flutter host view running in the foreground inactive state. Apps transition to this state when another activity is focused, such as a split-screen app, a phone call, a picture-in-picture app, a system dialog, or another window.

Apps in this state should assume that they may be paused at any time.

AppLifecycleState()
paused → const AppLifecycleState

The application is not currently visible to the user, not responding to user input, and running in the background.

When the application is in this state, the engine will not call the PlatformDispatcher.onBeginFrame and PlatformDispatcher.onDrawFrame callbacks.

AppLifecycleState()
detached → const AppLifecycleState

The application is still hosted on a flutter engine but is detached from any host views.

When the application is in this state, the engine is running without a view. It can either be in the progress of attaching a view when engine was first initializes, or after the view being destroyed due to a Navigator pop.

AppLifecycleState()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AppLifecycleState>
A constant List of the values in this enum, in order of their declaration.
[resumed, inactive, paused, detached]