skip to Main Content

i am facing this error for 3 days, i have just used firebase db for authentication, and i don’t know how to solve it
enter image description here

2

Answers


  1. As per thier error, answer is contained inside:

    enter image description here

    Add this WidgetsFlutterBinding.ensureInitialized();
    before runApp(const MyApp()); inside main()

    Login or Signup to reply.
  2. Try this…

    void main() async {
      WidgetsFlutterBinding.ensureInitialized();
      await Firebase.initializeApp();
      runApp(const MyApp());
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search