DarshanGowda0 / GeoFlutterFire

:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://youtu.be/MYHVyl-juUk
MIT License
305 stars 261 forks source link

Anyone know how to update the user's location and other parameters in the document id saved by geoflutterfire periodically over maybe 1.5 seconds ? #125

Closed bossbeagle1509 closed 4 years ago

bossbeagle1509 commented 4 years ago

Here's the current function I'm using to update stuff

void updateDB() {
    _getCurrentLocation();
    GeoFirePoint myLocation = geo.point(latitude: mLa, longitude: mLo);
    _firestore
        .collection('drivers')
        .document(docID)
        .updateData({'position': myLocation.data});
  }

It's called in initState and gives me a bunch of errors. Any help is greatly appreciated.