-
Notifications
You must be signed in to change notification settings - Fork 119
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
hello sir thank you for your tutorial ,but can you help me how can i change location change state with web socket that will update location #8
Comments
Hi @johnyenatu the best way to update the location change is using of course the location.onLocationChanged().listen, then inside the callback, you update the location. location.onLocationChanged().listen((LocationData cLoc) { If you want to implement it using web sockets (u mean via Firebase using the Real-Time Database?) i'd actually push the location changed inside that same method, send it up to Firebase to a collection that all users are reading: location.onLocationChanged().listen((LocationData cLoc) { Then, on the other end of the communication, on the side of the user that will be looking at the changes moving, just listen for the changes in that collection document locUpdate, sort of like this: var snapshots = _firestore await snapshots.forEach((document) async { None of the syntax is correct above, is just so you can get the idea. I haven't implemented it yet, but that's how I'd do it if using Firebase Real-time DB for example. |
thank you sir for your response it descriptive ,but can you elaborate on live tracking from firebase or other side where should I change or call backend to move marker . |
No description provided.
The text was updated successfully, but these errors were encountered: