Implementation
Config copyWith({
DesiredAccuracy? desiredAccuracy,
double? distanceFilter,
int? locationUpdateInterval,
int? fastestLocationUpdateInterval,
int? activityRecognitionInterval,
int? stopTimeout,
int? stopAfterElapsedMinutes,
int? stopDetectionDelay,
int? motionTriggerDelay,
int? minimumActivityRecognitionConfidence,
bool? useSignificantChangesOnly,
bool? allowIdenticalLocations,
bool? disableMotionActivityUpdates,
bool? disableStopDetection,
bool? disableProviderChangeRecord,
bool? disableLocationAuthorizationAlert,
bool? enableHeadless,
bool? startOnBoot,
bool? stopOnTerminate,
bool? foregroundService,
bool? preventSuspend,
bool? pausesLocationUpdatesAutomatically,
bool? showsBackgroundLocationIndicator,
double? stationaryRadius,
double? desiredOdometerAccuracy,
double? elasticityMultiplier,
double? speedJumpFilter,
bool? stopOnStationary,
bool? geofenceModeHighAccuracy,
bool? geofenceInitialTriggerEntry,
int? geofenceProximityRadius,
int? maxMonitoredGeofences,
int? locationTimeout,
int? httpTimeout,
int? maxRetry,
int? retryDelay,
double? retryDelayMultiplier,
int? maxRetryDelay,
String? bgTaskId,
String? url,
String? method,
JsonMap? headers,
JsonMap? params,
JsonMap? extras,
bool? autoSync,
bool? batchSync,
int? maxBatchSize,
int? autoSyncThreshold,
bool? disableAutoSyncOnCellular,
int? queueMaxDays,
int? queueMaxRecords,
String? idempotencyHeader,
PersistMode? persistMode,
int? maxDaysToPersist,
int? maxRecordsToPersist,
String? locationTemplate,
String? geofenceTemplate,
String? httpRootProperty,
List<String>? schedule,
bool? scheduleUseAlarmManager,
bool? forceReloadOnBoot,
bool? forceReloadOnLocationChange,
bool? forceReloadOnMotionChange,
bool? forceReloadOnGeofence,
bool? forceReloadOnHeartbeat,
bool? forceReloadOnSchedule,
bool? enableTimestampMeta,
NotificationConfig? notification,
LogLevel? logLevel,
int? logMaxDays,
int? heartbeatInterval,
PermissionRationale? backgroundPermissionRationale,
List<ActivityType>? triggerActivities,
AdaptiveTrackingConfig? adaptiveTracking,
LowBatteryConfig? lowBattery,
SpoofDetectionConfig? spoofDetection,
}) {
return Config(
desiredAccuracy: desiredAccuracy ?? this.desiredAccuracy,
distanceFilter: distanceFilter ?? this.distanceFilter,
locationUpdateInterval:
locationUpdateInterval ?? this.locationUpdateInterval,
fastestLocationUpdateInterval:
fastestLocationUpdateInterval ?? this.fastestLocationUpdateInterval,
activityRecognitionInterval:
activityRecognitionInterval ?? this.activityRecognitionInterval,
stopTimeout: stopTimeout ?? this.stopTimeout,
stopAfterElapsedMinutes:
stopAfterElapsedMinutes ?? this.stopAfterElapsedMinutes,
stopDetectionDelay: stopDetectionDelay ?? this.stopDetectionDelay,
motionTriggerDelay: motionTriggerDelay ?? this.motionTriggerDelay,
minimumActivityRecognitionConfidence:
minimumActivityRecognitionConfidence ??
this.minimumActivityRecognitionConfidence,
useSignificantChangesOnly:
useSignificantChangesOnly ?? this.useSignificantChangesOnly,
allowIdenticalLocations:
allowIdenticalLocations ?? this.allowIdenticalLocations,
disableMotionActivityUpdates:
disableMotionActivityUpdates ?? this.disableMotionActivityUpdates,
disableStopDetection: disableStopDetection ?? this.disableStopDetection,
disableProviderChangeRecord:
disableProviderChangeRecord ?? this.disableProviderChangeRecord,
disableLocationAuthorizationAlert: disableLocationAuthorizationAlert ??
this.disableLocationAuthorizationAlert,
enableHeadless: enableHeadless ?? this.enableHeadless,
startOnBoot: startOnBoot ?? this.startOnBoot,
stopOnTerminate: stopOnTerminate ?? this.stopOnTerminate,
foregroundService: foregroundService ?? this.foregroundService,
preventSuspend: preventSuspend ?? this.preventSuspend,
pausesLocationUpdatesAutomatically: pausesLocationUpdatesAutomatically ??
this.pausesLocationUpdatesAutomatically,
showsBackgroundLocationIndicator: showsBackgroundLocationIndicator ??
this.showsBackgroundLocationIndicator,
stationaryRadius: stationaryRadius ?? this.stationaryRadius,
desiredOdometerAccuracy:
desiredOdometerAccuracy ?? this.desiredOdometerAccuracy,
elasticityMultiplier: elasticityMultiplier ?? this.elasticityMultiplier,
speedJumpFilter: speedJumpFilter ?? this.speedJumpFilter,
stopOnStationary: stopOnStationary ?? this.stopOnStationary,
geofenceModeHighAccuracy:
geofenceModeHighAccuracy ?? this.geofenceModeHighAccuracy,
geofenceInitialTriggerEntry:
geofenceInitialTriggerEntry ?? this.geofenceInitialTriggerEntry,
geofenceProximityRadius:
geofenceProximityRadius ?? this.geofenceProximityRadius,
maxMonitoredGeofences:
maxMonitoredGeofences ?? this.maxMonitoredGeofences,
locationTimeout: locationTimeout ?? this.locationTimeout,
httpTimeout: httpTimeout ?? this.httpTimeout,
maxRetry: maxRetry ?? this.maxRetry,
retryDelay: retryDelay ?? this.retryDelay,
retryDelayMultiplier: retryDelayMultiplier ?? this.retryDelayMultiplier,
maxRetryDelay: maxRetryDelay ?? this.maxRetryDelay,
bgTaskId: bgTaskId ?? this.bgTaskId,
url: url ?? this.url,
method: method ?? this.method,
headers: headers ?? this.headers,
params: params ?? this.params,
extras: extras ?? this.extras,
autoSync: autoSync ?? this.autoSync,
batchSync: batchSync ?? this.batchSync,
maxBatchSize: maxBatchSize ?? this.maxBatchSize,
autoSyncThreshold: autoSyncThreshold ?? this.autoSyncThreshold,
disableAutoSyncOnCellular:
disableAutoSyncOnCellular ?? this.disableAutoSyncOnCellular,
queueMaxDays: queueMaxDays ?? this.queueMaxDays,
queueMaxRecords: queueMaxRecords ?? this.queueMaxRecords,
idempotencyHeader: idempotencyHeader ?? this.idempotencyHeader,
persistMode: persistMode ?? this.persistMode,
maxDaysToPersist: maxDaysToPersist ?? this.maxDaysToPersist,
maxRecordsToPersist: maxRecordsToPersist ?? this.maxRecordsToPersist,
locationTemplate: locationTemplate ?? this.locationTemplate,
geofenceTemplate: geofenceTemplate ?? this.geofenceTemplate,
httpRootProperty: httpRootProperty ?? this.httpRootProperty,
schedule: schedule ?? this.schedule,
scheduleUseAlarmManager:
scheduleUseAlarmManager ?? this.scheduleUseAlarmManager,
forceReloadOnBoot: forceReloadOnBoot ?? this.forceReloadOnBoot,
forceReloadOnLocationChange:
forceReloadOnLocationChange ?? this.forceReloadOnLocationChange,
forceReloadOnMotionChange:
forceReloadOnMotionChange ?? this.forceReloadOnMotionChange,
forceReloadOnGeofence:
forceReloadOnGeofence ?? this.forceReloadOnGeofence,
forceReloadOnHeartbeat:
forceReloadOnHeartbeat ?? this.forceReloadOnHeartbeat,
forceReloadOnSchedule:
forceReloadOnSchedule ?? this.forceReloadOnSchedule,
enableTimestampMeta: enableTimestampMeta ?? this.enableTimestampMeta,
notification: notification ?? this.notification,
logLevel: logLevel ?? this.logLevel,
logMaxDays: logMaxDays ?? this.logMaxDays,
heartbeatInterval: heartbeatInterval ?? this.heartbeatInterval,
backgroundPermissionRationale:
backgroundPermissionRationale ?? this.backgroundPermissionRationale,
triggerActivities: triggerActivities ?? this.triggerActivities,
adaptiveTracking: adaptiveTracking ?? this.adaptiveTracking,
lowBattery: lowBattery ?? this.lowBattery,
spoofDetection: spoofDetection ?? this.spoofDetection,
);
}