相关疑难解决方法(0)

创建默认应用程序时 FirebaseOptions 不能为 null

我正在尝试在 Flutter 集成电子邮件和基于 google 的登录中尝试一个示例项目,并计划使用 firebase 初始化来执行此操作,同时我已按照教程中提到的所有步骤进行操作,一旦尝试使用 firebase,我就会收到此错误已初始化。

"FirebaseOptions cannot be null when creating the default app."
    at Object.throw_ [as throw] (http://localhost:7357/dart_sdk.js:5063:11)
    at Object.assertFailed (http://localhost:7357/dart_sdk.js:4988:15)
at firebase_core_web.FirebaseCoreWeb.new.initializeApp (http://localhost:7357/packages/firebase_core_web/firebase_core_web.dart.lib.js:252:42)
    at initializeApp.next (<anonymous>)
    at http://localhost:7357/dart_sdk.js:40192:33
    at _RootZone.runUnary (http://localhost:7357/dart_sdk.js:40062:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:7357/dart_sdk.js:34983:29)
    at handleValueCallback (http://localhost:7357/dart_sdk.js:35551:49)
    at Function._propagateToListeners (http://localhost:7357/dart_sdk.js:35589:17)
    at _Future.new.[_completeWithValue] (http://localhost:7357/dart_sdk.js:35437:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:7357/dart_sdk.js:35458:35)
    at Object._microtaskLoop (http://localhost:7357/dart_sdk.js:40330:13)
    at _startMicrotaskLoop (http://localhost:7357/dart_sdk.js:40336:13)
    at http://localhost:7357/dart_sdk.js:35811:9
Run Code Online (Sandbox Code Playgroud)

这是我的index.html

<!DOCTYPE html>
<html>
<head>
  <!--
    If you are serving your web app in a path other than the root, change …
Run Code Online (Sandbox Code Playgroud)

web dart firebase flutter

54
推荐指数
4
解决办法
7万
查看次数

标签 统计

dart ×1

firebase ×1

flutter ×1

web ×1