getGeofences static method

Future<List<Geofence>> getGeofences()

Gets all registered geofences.

Implementation

static Future<List<Geofence>> getGeofences() async {
  final result = await LocusChannels.methods.invokeMethod('getGeofences');
  if (result is List) {
    return result
        .map((e) => Geofence.fromMap(Map<String, dynamic>.from(e)))
        .toList();
  }
  return [];
}