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());
});