【发布时间】:2020-07-14 19:18:03
【问题描述】:
我正在尝试弄清楚如何在 Cloud Firestore 中查询数字。这是我的代码:
final result = await Firestore.instance.collection('Social_Posts').where(30, isGreaterThan: "views").getDocuments();
我收到以下错误:
Unhandled Exception: 'package:cloud_firestore_platform_interface/src/method_channel/method_channel_query.dart': Failed assertion: line 119 pos 12: 'field is String || field is FieldPath': Supported [field] types are [String] and [FieldPath].
看起来 Cloud Firestore 查询只接受字符串。 如果是这样,那我怎么查询数字呢?
【问题讨论】:
标签: firebase flutter dart google-cloud-firestore