Search code examples
google-mapsgeolocationfluttermap

Check user is in particular radius or not (Flutter)


I want to check if the user is in his/her house using their Geolocation. The app will be running in the foreground and no map will be displayed. The user's house lat and long will be stored in the Firestore.

When the user opens the app, I want to check whether he/she is in his house. As house size may vary, I would consider it for few meter of radius.

Any help will be appreciated.


Solution

  • This is called geofencing. In this case, a few meters of radius around the house is the geofence.

    You will be able to easily do this by using this flutter package. There are many other geofencing packages as well. Check on pub.dev