Skip to content
pubscout

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.

WASM-ready
$ flutter pub add geofencing_api
Source repository

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.

Works with

Packages commonly used together with geofencing_api: ones it builds on, ones built on it, and its own family.