我对firebase和flutter有意见。我正在建立的应用程序登录并显示从收集的费用列表,其名称是用户id。当用户登录时,他将看到包含其集合中的项目的列表。我使用的是Stream方法。问题是,在用户登录之前,stream接收到null id,应用程序崩溃。有没有办法在用户登录后设置这个流?我将非常感谢您的帮助! 这就是错误 The following assertion was thrown building Home(dirty):
'package:cloud_firestore/src/firestore.dart': Failed assertion: line 7
我正在开发同时适用于web和移动端的Flutter App,并遇到以下错误: ======== Exception caught by widgets library =======================================================
The following ProviderNotFoundException was thrown building Products(dirty):
Error: Could not find the correct Provider<List<ProductsModel>> above
我有一个名为Database.dart的文件,在这里我插入了“虚拟”数据,并设置了到Firebase的连接。使用Meals.dart,我希望稍后在屏幕上显示数据。现在,我想在我的调试控制台中显示这个虚拟数据。我试图更改Meals.dart中的“Meals.dart”,但我没有搞清楚代码中的问题是什么。
,这是我得到的错误代码.
════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building Me
我正在制作一个实时聊天应用程序。下面的函数是在数据库中新建一个聊天室。getChatRoomId基本上为聊天室创建了一个唯一id,该id在数据库中分配给chat_room_id。该chat_room_id有一个集合,即chat_room_id本身和users数组。当我调用此函数时出现错误。我正在打印数据,就像您在下面的方法中看到的那样。方法调用是完美的(here i am),看起来我有一个chat_room_id,因为我expected.Also我有一个chatRoomMap。但是,当我尝试打印出信息时,它会打印出null。请查看下面的错误部分以查看打印结果。 createChatRoomA
我正在尝试将我的Firebase后端连接到我的Flutter应用程序。在为Firestore创建一个简单的get()请求时,我每次都会遇到相同的错误: [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation. 我尝试过的安全规则如下: service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
a
当我尝试执行我的flutter应用程序时,我得到了以下错误: ======== Exception caught by widgets library =======================================================
The following _CastError was thrown building VerifyEmail(dirty, dependencies: [_InheritedProviderScope<User?>], state: _VerifyEmailState#da862):
Null check opera
我试图从Firebase Firestore中检索一个字段,并将其放入自定义对象中。我成功地从代码中上传了自定义对象,没有任何问题,但是当我试图读取和访问Firestore中的对象列表时,我一直收到以下错误:
java.lang.ClassCastException: java.util.HashMap cannot be cast to SelfMadeQuestion
SelfMadeQuestion类如下所示:
class SelfMadeQuestion(
var openQuestion: Boolean = false,
var questionText: Stri
我什么都试过了。我试着移动到android X,仍然有同样的问题。只有cloud_firestore和firebase_auth插件。 以下是我的错误和到目前为止我已经尝试过的。 错误: Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated
我试图通过将我的简单FireStore身份验证提供程序示例迁移到RiverPod来理解RiverPod。 这是我的AuthenticationService: import 'package:firebase_auth/firebase_auth.dart';
class AuthenticationService {
final FirebaseAuth _firebaseAuth;
AuthenticationService(this._firebaseAuth);
// with StreamProvider we listen to these cha
我按照在firestore中注册我的移动应用程序的步骤操作,但是当我尝试运行代码时,我得到了以下错误。在注册我的应用程序时,我从firestore下载了google services.json,并将其添加到我的项目的android/app级别。我还在我的android/app/build gradle文件中添加了'com.google.firebase:firebase-analytics-ktx‘ FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependen
运行flutter build web会产生以下错误:
flutter build web
Changing current working directory to: /home/forest/projects/icell/i_cell_parking_manager
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Target dart2js failed: Exception: ../../../snap/flutt
在尝试flutter build apk时,我得到了这个错误:
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
当我尝试在android studio中构建flutter App Bundle (RUN -- build -- Build App Bundle)时,我得到了以下注释: C:\Src\flutter\flutter\bin\flutter.bat --no-color build appbundle
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Running Gradle task 'bundleRele