Honoring Asian Pacific American Heritage Month. See how.

enableLifecycleEvents method

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

void enableLifecycleEvents (Outgoing outgoing)

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


static void enableLifecycleEvents(Outgoing outgoing) {
  if (_singleton == null) {
    _singleton = LifecycleImpl(
      outgoing: outgoing,
      exitHandler: fuchsia.exit,
  } else {
    throw Exception(
        'Attempted to call Lifecycle.enableLifecycleEvents after it has already been enabled. '
        'Ensure that Lifecycle.enableLifecycleEvents is not called multiple times.');