Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flatter Firebase firestore.data[“数据]错误_Firebase_Flutter_Google Cloud Firestore - Fatal编程技术网

Flatter Firebase firestore.data[“数据]错误

Flatter Firebase firestore.data[“数据]错误,firebase,flutter,google-cloud-firestore,Firebase,Flutter,Google Cloud Firestore,我正在将firebase“cloud\u firestore:^0.14.3+1”与我的Flatter应用程序一起使用,并尝试从firebase获取数据,但是..数据[“名称]代码不起作用。我如何修复此问题 这样做。您需要调用data()['fieldName'] return SearchTile( userName: searchSnapshot.docs[index].data()["name"], userEmail: searchSnapsho

我正在将firebase“cloud\u firestore:^0.14.3+1”与我的Flatter应用程序一起使用,并尝试从firebase获取数据,但是..数据[“名称]代码不起作用。我如何修复此问题


这样做。您需要调用data()['fieldName']

  return SearchTile(
    userName: searchSnapshot.docs[index].data()["name"],
    userEmail: searchSnapshot.docs[index].data()["email"],
  );
  return SearchTile(
    userName: searchSnapshot.docs[index].data()["name"],
    userEmail: searchSnapshot.docs[index].data()["email"],
  );