Skip to content

[core/not-initialized] Firebase has not been correctly initialized. #40

@Ayoub-Mentag

Description

@Ayoub-Mentag

I got this error after I we set the (dynamic result = await _auth.signInAnon(); in sign_in.dart )
and I add this code to the main.dart to initialize firebase
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: FirebaseOptions(apiKey: "XXXX",
appId: "",
messagingSenderId: "",
projectId: "XXXX")
);

and it works , my issue why we should do that, cause in the course it works without adding these lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions