Use Flutter google maps . Enable google maps API in google cloud console for your platform(s), Android, iOS, JavaScript if you want web. Install your location dependency. Update your database with the new coords when they change.
Read moreHow do I fetch user location in background with Flutter?
Position userLocation = await geoLocator. getCurrentPosition(desiredAccuracy: LocationAccuracy. high); As you have guessed, this line will actually get the current position.6 May 2020
Read moreWhere is the user location in flutter Web?
Flutter Web and Mozilla Geolocation…
Read moreWhat is the background location?
Android 10 features a background access location reminder, which increases transparency into how much access apps have to a device’s location and helps users maintain control over such access. In Android 9 and lower, an app can track a device’s location while running in the background without the user’s knowledge.
Read more