IosLocationOptions.fromMap constructor

IosLocationOptions.fromMap(
  1. Map map
)

Creates options from a serialized map.

Implementation

factory IosLocationOptions.fromMap(Map<dynamic, dynamic> map) {
  return IosLocationOptions(
    allowsBackgroundLocationUpdates:
        map['allowsBackgroundLocationUpdates'] as bool? ?? false,
    showsBackgroundLocationIndicator:
        map['showsBackgroundLocationIndicator'] as bool? ?? false,
    pausesLocationUpdatesAutomatically:
        map['pausesLocationUpdatesAutomatically'] as bool? ?? true,
    enableSignificantLocationChanges:
        map['enableSignificantLocationChanges'] as bool? ?? false,
    enableVisitMonitoring: map['enableVisitMonitoring'] as bool? ?? false,
    activityType: map['activityType'] as String? ?? 'other',
    geofenceNotifyOnEntry: map['geofenceNotifyOnEntry'] as bool? ?? true,
    geofenceNotifyOnExit: map['geofenceNotifyOnExit'] as bool? ?? true,
  );
}