Closed spiderion closed 4 years ago
I've realised it has something to do with a change in the latest version of cloud_firestore package, which geoflutterfire depends on. Downgrading to 0.12.11 fixes this.
in cloud_firestore 0.12.11, data
is a field
in the latest versions, data
is a getter
@DarshanGowda0 any planned fix for this?
I've realised it has something to do with a change in the latest version of cloud_firestore package, which geoflutterfire depends on. Downgrading to 0.12.11 fixes this. in cloud_firestore 0.12.11, data is a field in the latest versions, data is a getter
cloud_firestore 0.13.0+1 (+2?) also works with geoflutterfire.
https://github.com/DarshanGowda0/GeoFlutterFire/pull/80 @DarshanGowda0 please have a look
80
@DarshanGowda0 please have a look
This worked wonders.
Thanks @spiderion for the fix
But where can I find the 'distance' field in the DocumentSnapshot now?
But where can I find the 'distance' field in the DocumentSnapshot now?
This is what I came here to find out as well. Looks like it's contained in DistanceDocSnapshot, but the .within() query only returns the inner DocumentSnapshot...
Looks like with the new flutter update is not possible to set data on The documentSnapshot.data[]
documentSnapshot.data['distance'] = center.distance(lat: geoPoint.latitude, lng: geoPoint.longitude);
var distance = documentSnapshot.data['distance'] ; print(distance) // will be null