android - 我如何计算来自firestore的文档数量并以文本形式返回
问题描述
我想计算一个集合中有多少文档,
child: Card(
child: ListTile(
title: FlatButton.icon(
onPressed: null,
icon: Icon(Icons.people_outline),
label: Text("Users")),
subtitle: Text( Firestore.instance.collection('users').snapshots().length.toString() , textAlign: TextAlign.center, style: TextStyle(color: active, fontSize: 12.0),)),
),
解决方案
推荐阅读
- ruby-on-rails - 如何在rails中制作重定向按钮
- wordpress - Open Site Shell 不适用于 Linux 上的 Local by Flywheel
- python - 使用 word2vec 和 gensim 查找相似词,抛出错误
- tensorflow - 如何在 Tensorflow 1.14.0 中打印冻结推理模型的节点名称?
- c# - Xamarin TimeSpan 使用时间小于 1 毫秒
- python - 如何在文件中找到最大的多位数字并对文件进行排序(Python)
- javascript - 我尝试使用按钮下载本地文件,但找不到该文件
- laravel - 无法修复 laravel 上的顺风组件下拉菜单
- python - 强制数字的正则表达式小于 1000 并且如果有小数点
- javascript - 是否可以动态解构返回?