Lifecycle class

*[<Null safety>](https://dart.dev/null-safety)*

Allows running components to be notified when lifecycle events happen in the system.

Constructors

Lifecycle ()

Obtains an instance of the shared Lifecycle instance. factory

Properties

hashCode → int

The hash code for this object.
read-only, inherited

runtimeType → Type

A representation of the runtime type of the object.
read-only, inherited

Methods

addTerminateListener(Future<void> listener()) bool

Adds a terminate listener which will be called when the system starts to shutdown this process. Returns false if this listener was already added.

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

Static Methods

enableLifecycleEvents(Outgoing outgoing) void

Initializes the shared Lifecycle instance. This is required before Lifecycle can be constructed.