coreNotInitialized function Null safety

FirebaseException coreNotInitialized()

Throws a consistent error message if the user attempts to initializes core without it being available on the underlying platform.

Implementation

FirebaseException coreNotInitialized() {
  String message = '''
Firebase has not been correctly initialized.

Usually this means you've attempted to use a Firebase service before calling `Firebase.initializeApp`.

View the documentation for more information: https://firebase.flutter.dev/docs/overview#initialization
    ''';

  return FirebaseException(
      plugin: 'core', code: 'not-initialized', message: message);
}