0

I am working on one app but when i run the app it is showing me an error and in device it is showing me white screen

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()

I have initialize app in app as:

    await Firebase.initializeApp().whenComplete(() async {
    FirebaseMessaging.onBackgroundMessage(backgroundHandler);
    Constants.prefs = await SharedPreferences.getInstance();
    // [this is firebase notification settings]
    await FirebaseNotification.settings();
    print("jhgjhmgh===>>${AppData.fcmToken}");

    mainStartDataGet();
    runApp(MyApp());
  });
  • Does this answer your question? [No Firebase App '\[DEFAULT\]' has been created - call Firebase.initializeApp() in Flutter and Firebase](https://stackoverflow.com/questions/63492211/no-firebase-app-default-has-been-created-call-firebase-initializeapp-in) – Abdelrahman M. Elmarakby Dec 21 '22 at 14:39

0 Answers0