mock static method

Geofence mock({
  1. String? identifier,
  2. double latitude = 0,
  3. double longitude = 0,
  4. double radius = 100,
  5. bool notifyOnEntry = true,
  6. bool notifyOnExit = true,
  7. bool notifyOnDwell = false,
  8. int loiteringDelay = 0,
  9. Map<String, dynamic>? extras,
})

Creates a mock geofence.

Implementation

static Geofence mock({
  String? identifier,
  double latitude = 0,
  double longitude = 0,
  double radius = 100,
  bool notifyOnEntry = true,
  bool notifyOnExit = true,
  bool notifyOnDwell = false,
  int loiteringDelay = 0,
  Map<String, dynamic>? extras,
}) {
  return Geofence(
    identifier: identifier ??
        'mock-geofence-${DateTime.now().millisecondsSinceEpoch}',
    latitude: latitude,
    longitude: longitude,
    radius: radius,
    notifyOnEntry: notifyOnEntry,
    notifyOnExit: notifyOnExit,
    notifyOnDwell: notifyOnDwell,
    loiteringDelay: loiteringDelay,
    extras: extras,
  );
}