No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

后端 未结 9 1493
离开以前
离开以前 2020-11-22 15:32

I am building a flutter App and I have integrated Firebase but I keep getting this error when I click on a button either to register, login or logout. I have seen other peop

9条回答
  •  面向向阳花
    2020-11-22 15:54

    If you want to connect the firebase with flutter app you need to initalizt the firebase before using it. You can declare it as given below and it will help you to resolve the issue

    void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    runApp(MyApp());
    }
    

    In the video you will get in detail about the error

提交回复
热议问题