Lifecycle constructor

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

Lifecycle()

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!;
}