I am getting an exception when I try to order by date with descending equals true.
final snapshots = firebaseFirestore.collectionStream(
path: ridesCollectionPath,
queryBuilder: (query) => query
.where(
Filter.and(
Filter("userId", isEqualTo: userId),
Filter.or(
Filter("date", isLessThan: DateTime.now()),
Filter("cancelled", isEqualTo: true),
),
),
)
.orderBy('date', descending: true),
);
It works if I set descending
to false
.
This is the exception, it doesn’t say much:
I/flutter (24875): Error: #0 EventChannelExtension.receiveGuardedBroadcastStream (package:_flutterfire_internals/src/exception.dart:67:43)
I/flutter (24875): #1 MethodChannelQuery.snapshots. (package:cloud_firestore_platform_interface/src/method_channel/method_channel_query.dart:183:18)
I/flutter (24875):
I/flutter (24875):
I/flutter (24875): Error: #0 EventChannelExtension.receiveGuardedBroadcastStream (package:_flutterfire_internals/src/exception.dart:67:43)
I/flutter (24875): #1 MethodChannelQuery.snapshots. (package:cloud_firestore_platform_interface/src/method_channel/method_channel_query.dart:183:18)