close

[solved] Flutter Error : No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase

Hello Guys How are you all? hope you all are super fine. well whenever we use a firebase service-related plugin in a flutter project and then we get dependency, almost every developer would face this error Flutter Error: No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase.

I have decided to make all possible solution write down here so it will helpful for you. So without wasting your time lets start this article.

How Flutter Error : No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase error occurs ?

How to solve Flutter Error : No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase ?

Question: How to solve Flutter Error : No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase ?
Answer: Then we must have to call Firebase.initializeApp(): in our app. same as like below.

Solution 1 :

Since August 2017 All Firebase service updated so you must have to call Firebase.initializeApp() before using any Firebase product, for example:

We want to use firebase_core plugin in flutter, then our pubspec.yaml file will be same as below.

Then we must have to call Firebase.initializeApp(): in our app. same as like below.

Solution 2 :

pubspec.yaml

Then we have to call Firebase.initializeApp(): whenever you want to use.

here Is Git Issue #11351

So, Guys both solutions are worked for me. let me know in the comment section if it is worked for you as well.

Also Read

Leave a Comment

%d bloggers like this: