*[<Null safety>](https://dart.dev/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!;
}