Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.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
Firebase FieldPath是否在颤振中得到支持?_Firebase_Dart_Flutter_Google Cloud Firestore - Fatal编程技术网

Firebase FieldPath是否在颤振中得到支持?

Firebase FieldPath是否在颤振中得到支持?,firebase,dart,flutter,google-cloud-firestore,Firebase,Dart,Flutter,Google Cloud Firestore,我在中找不到FieldPath,但是,我假设这是一个非常常见的工具,它将是此类插件的首批实现之一 最近添加了,但我在字段路径上找不到任何内容 如果我想在当前的查询中使用documentId,有没有办法实现这一点?我实际上忘记了这一点,但我在某个时候将其添加到了cloud\u firestore 这意味着您可以这样简单地使用它: Firestore.instance.collection('movies').orderBy('rating').orderBy(FieldPath.documentI

我在中找不到
FieldPath
,但是,我假设这是一个非常常见的工具,它将是此类插件的首批实现之一

最近添加了,但我在
字段路径上找不到任何内容


如果我想在当前的查询中使用
documentId
,有没有办法实现这一点?

我实际上忘记了这一点,但我在某个时候将其添加到了
cloud\u firestore

这意味着您可以这样简单地使用它:

Firestore.instance.collection('movies').orderBy('rating').orderBy(FieldPath.documentId);
过时的
\uuuu name\uuuu
如果要将文档id作为目标,则可以使用

您可以使用
“名称”
作为
字符串,这相当于
字段路径.documentId()

String fieldPathDocumentId='\uuuuuu name\uuuuuuuu';
Firestore.instance.collection('movies').orderBy('rating').orderBy(fieldPathDocumentId);
这对我很有用。(我不确定这是否是您想要的。)


您可以发布一些如何使用它的示例吗?@creativecreatormormaybenot一个人如何使用name作为实例来获取documentId
Firestore.instance.collection('/collection-name')
  .where(FieldPath.documentId, isEqualTo: _someID)
  .snapshots().listen((snapshots){
    /*

    */
  });