Location Triggered

Download

Installation

To add MoEngage Geofence SDK to your application, edit the application's pubspec.yaml file and add the below dependency to it:

pubspec.yaml
dependencies:
 moengage_geofence: $latestVersion

Run flutter packages get to install the SDK.

Note: This plugin is dependent on moengage_flutter plugin. Make sure you have installed the moengage_flutter plugin as well. Refer to the doc for the same.

iOS Initialization

After integrating the geofence package call startGeofenceMonitoring() method to initiate the geofence module, this will fetch the geofences around the current location of the user. Refer to the doc for more information on Geofence.

Dart
import 'package:moengage_geofence/moe_geofence.dart';

final MoEngageGeofence _moEngageGeofence = MoEngageGeofence(YOUR_APP_ID);
@override
void initState() {
  super.initState();
  initPlatformState();
  _moEngageGeofence.startGeofenceMonitoring();
}
Was this article helpful?
0 out of 0 found this helpful