在这个线程中提到的方法,我正在尝试从Firestore获取数据。但是得到了以下异常。'name'字段是一个字符串,而'overview'字段是一个字符串列表。
Bad state: cannot get a field on a DocumentSnapshotPlatform which does not exist
我的代码如下:
import 'package:firebaseAuth/firebaseAuthDemo.dart';
import 'package:firebase_auth/firebase_auth.dart
当我运行我的应用程序(,fireBase )时,我得到了这个E/颤振(25055)错误
我试着更新我的颤音,但我还是得到了相同的日志,这些日志使我的应用程序不稳定,应用程序崩溃了很多
E/flutter (25055): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform
E/flutter (25055): #0 DocumentSnapshotPlatform.get
在飞镖/颤音和学习Firebase Firestore..。在创建UI之前,我使用以下方法进行测试:
_testFireStore() async {
var result = Firestore.instance
.collection('users')
.where('uid', isEqualTo: 'IvBEiD990Vh0D9t24l2GCCdsrAf1')
.snapshots();
await for (var snapshot in result) {
for (var use
如果有人能帮我发现这个错误在我的颤音应用程序中发生了什么,我会很感激的。
我认为从数据库流返回的数据类型存在问题
在我的应用程序中,我必须从“用户”的Firestore集合中检索用户信息,以便在用户配置文件屏幕中显示,但我得到了以下错误:
======== Exception caught by widgets library =======================================================
The following StateError was thrown building UserProfile(dirty, dependencies: [
不知何故,我不能让这段代码工作: 我的模型是: class Location {
final String name;
final String route;
final String id;
final GeoPoint location;
final List images;
final String address;
Location(
{this.name,
this.route,
this.id,
this.location,
this.images,
this.address})
我试图将两个数据集合从firebase检索到屏幕,作为一个列表在颤振app.But中显示错误“坏状态:字段不存在于DocumentSnapshotPlatform中”。我不知道怎么修好它。有人能帮我解决这个问题吗?谢谢你!!这是我的密码
final CollectionReference _addExpense= FirebaseFirestore.instance.collection('add_expense');
final CollectionReference _addincome= FirebaseFirestore.instance.collection('
我正在从一个链接到别名字段的Firebase集合中获取一个URL。这部分代码是可以的,但我无法使用检索到的数据的URL字段进行重定向。这是我的代码:
import React from 'react'
import { useParams, Redirect } from 'react-router-dom'
import { FirebaseContext } from '../firebase'
function RedirUrl () {
const { alias } = useParams()
let link = '
我在聊天应用程序上工作,我正在尝试使用分页来检索firestore中的有限数量的数据,并在用户不断滚动时检索其余的数据,我还想倾听数据库中的最新更改并将其显示给用户。我尝试这样做:创建一个Stream类,该类在构造函数中包含一个快照侦听器,并将任何新的更改添加到流控制器,它还有一个方法,用于检索分页数据并在用户滚动时将其添加到流控制器。问题是,当从数据库中检索数据并将其添加到流控制器时,它会替换以前的数据,而不是添加到其中。下面是我创建的类 class ChatStream {
final String messageId;
final _controller = StreamCon