GeoConfig.fromMap constructor
Implementation
factory GeoConfig.fromMap(Map<String, dynamic> m) => GeoConfig(
distanceFilter: _ensureDouble(m['distanceFilter']),
desiredAccuracy: (m['desiredAccuracy'] != null)
? DesiredAccuracy.from(m['desiredAccuracy'])
: null,
locationUpdateInterval:
_ensureInt(m['locationUpdateInterval'] ?? m['interval']),
fastestLocationUpdateInterval: _ensureInt(
m['fastestLocationUpdateInterval'] ?? m['fastestInterval']),
locationTimeout: _ensureInt(m['locationTimeout']),
deferTime: _ensureInt(m['deferTime']),
disableElasticity: _ensureBool(m['disableElasticity']),
elasticityMultiplier: _ensureDouble(m['elasticityMultiplier']),
allowIdenticalLocations: _ensureBool(m['allowIdenticalLocations']),
enableTimestampMeta: _ensureBool(m['enableTimestampMeta']),
useSignificantChangesOnly: _ensureBool(m['useSignificantChangesOnly']),
disableLocationAuthorizationAlert:
_ensureBool(m['disableLocationAuthorizationAlert']),
stationaryRadius: _ensureInt(m['stationaryRadius']),
stopTimeout: _ensureInt(m['stopTimeout']),
stopAfterElapsedMinutes: _ensureInt(m['stopAfterElapsedMinutes']),
geofenceProximityRadius: _ensureInt(m['geofenceProximityRadius']),
geofenceInitialTriggerEntry:
_ensureBool(m['geofenceInitialTriggerEntry']),
geofenceModeHighAccuracy: _ensureBool(m['geofenceModeHighAccuracy']),
filter: (m['filter'] is Map)
? LocationFilter.fromMap(
(m['filter'] as Map).cast<String, dynamic>())
: null,
pausesLocationUpdatesAutomatically:
_ensureBool(m['pausesLocationUpdatesAutomatically']),
showsBackgroundLocationIndicator:
_ensureBool(m['showsBackgroundLocationIndicator']),
activityType: (m['activityType'] != null)
? ActivityType.from(m['activityType'])
: null,
locationAuthorizationAlert: (m['locationAuthorizationAlert'] is Map)
? (m['locationAuthorizationAlert'] as Map).cast<String, dynamic>()
: null,
maxMonitoredGeofences: _ensureInt(m['maxMonitoredGeofences']),
);