geofencing_api
2.0.0, released 2 years ago by pravera.me
Implement circular and polygon geofencing services with real-time status and location changes.
What it does
Allows developers to set up circular or polygon geofence regions, listen to real-time status changes (enter, exit, dwell), and track location updates. It navigates location changes while the app is alive to provide more accurate geofencing.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect when a user enters, exits, or dwells within circular or polygon regions.
- You require real-time location and geofence status updates.
- You want to build custom geofencing logic for Android, iOS, or Web.
Skip it when
- You rely strictly on battery-efficient native platform geofencing APIs, since this plugin navigates location while the app is alive.
- You do not want to manage platform-specific location permissions.
Strengths
- Supports both circular and polygon geofence regions.
- Provides real-time geofence status and location change listeners.
- Cross-platform support including Android, iOS, and Web.
Weaknesses
- Battery efficiency cannot be guaranteed because it does not use native platform geofencing APIs.
- Requires additional packages like flutter_foreground_task for background service implementation.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Requires location permissions declared in AndroidManifest.xml and Info.plist, and background mode settings if background tracking is needed.
void setupGeofencing() {
Geofencing.instance.setup(
interval: 5000,
accuracy: 100,
statusChangeDelay: 10000,
allowsMockLocation: false,
printsDebugLog: true,
);
}Alternatives
Packages that do the same job and could replace geofencing_api.
- geofence_foreground_service
A Flutter plugin that handles geofencing using a foreground service on Android and Core Location on iOS.
71Compare - geoclue
Dart client for the GeoClue D-Bus geolocation service on Linux.
50Compare
Works with
Packages commonly used together with geofencing_api: ones it builds on, ones built on it, and its own family.
- vector_mathgeofencing_api depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- plugin_platform_interfacegeofencing_api depends on itReusable base class for platform interfaces of Flutter federated plugins.
- fl_locationgeofencing_api depends on itPlugin to access device location on Android, iOS, and Web