onEnterGeofences method

Future<void> onEnterGeofences(
  1. OnEnteredGeofencesCallback callback
)

Get notified when the user enters a Geofence. Call this method before the positioning is started.

Implementation

Future<void> onEnterGeofences(OnEnteredGeofencesCallback callback) async {
  _onEnteredGeofencesCallback = callback;
  // Install the native listener only when it was explicitly required as it
  // supposes a computational costs.
  await methodChannel.invokeMethod('geofenceCallbacksRequested');
}