Google is committed to advancing racial equity for Black communities. See how.

Lifecycle constructor

*<Null safety>*

Lifecycle()

Obtains an instance of the shared Lifecycle instance.

Implementation

factory Lifecycle() {
  if (_singleton == null) {
    throw Exception(
        'Attempted to construct Lifecycle before lifecycle events have been enabled. '
        'Ensure that Lifecycle.enableLifecycleEvents is called first.');
  }
  return _singleton!;
}