Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geoflutterfire with where statement #103

Open
zpawlo02 opened this issue Jun 28, 2020 · 1 comment
Open

Geoflutterfire with where statement #103

zpawlo02 opened this issue Jun 28, 2020 · 1 comment

Comments

@zpawlo02
Copy link

zpawlo02 commented Jun 28, 2020

So when I'm trying to put ref like this:
var q = _firestore.collection('users').where('age', isGreaterThanOrEqualTo: minAge).where('age', isLessThanOrEqualTo: maxAge);
to:

Geoflutterfire geo = Geoflutterfire();
return geo.collection(collectionRef: q)
        .within(center: center, radius: radius, field: 'position');

I'm getting this error:

_Unhandled Exception: PlatformException(invalid_query, FIRInvalidArgumentException, Invalid query. You have a where filter with an inequality (lessThan, lessThanOrEqual, greaterThan, or greaterThanOrEqual) on field 'age' and so you must also use 'age' as your first queryOrderedBy field, but your first queryOrderedBy is currently on field 'position.geohash' instead.)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
#3      MethodChannelQuery.snapshots.<anonymous closure> (package:cloud_firestore_platform_interface/src/method_channel/method_channel_query.dart:55:50)
#4      _runGuarded (dart:async/stream_controller.dart:823:24)
#5      _BroadcastStreamController._subscribe (dart:async/broadcast_stream_contr<…>_
@zpawlo02 zpawlo02 changed the title Geoflutterfire is not working with query which contains 2 where statements Geoflutterfire with where statement Jun 28, 2020
@ghost
Copy link

ghost commented Sep 8, 2020

isGreaterThanOrEqualTo and isLessThanOrEqualTo appears to not work at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant