copyWith method

AdaptiveTrackingConfig copyWith({
  1. bool? enabled,
  2. SpeedTiers? speedTiers,
  3. BatteryThresholds? batteryThresholds,
  4. bool? activityOptimization,
  5. bool? stationaryGpsOff,
  6. Duration? stationaryDelay,
  7. double? minAccuracyMeters,
  8. bool? filterDuplicates,
  9. double? duplicateDistanceMeters,
  10. bool? geofenceOptimization,
  11. bool? smartHeartbeat,
  12. Duration? maxHeartbeatInterval,
  13. Duration? minHeartbeatInterval,
})

Creates a copy with the given fields replaced.

Implementation

AdaptiveTrackingConfig copyWith({
  bool? enabled,
  SpeedTiers? speedTiers,
  BatteryThresholds? batteryThresholds,
  bool? activityOptimization,
  bool? stationaryGpsOff,
  Duration? stationaryDelay,
  double? minAccuracyMeters,
  bool? filterDuplicates,
  double? duplicateDistanceMeters,
  bool? geofenceOptimization,
  bool? smartHeartbeat,
  Duration? maxHeartbeatInterval,
  Duration? minHeartbeatInterval,
}) {
  return AdaptiveTrackingConfig(
    enabled: enabled ?? this.enabled,
    speedTiers: speedTiers ?? this.speedTiers,
    batteryThresholds: batteryThresholds ?? this.batteryThresholds,
    activityOptimization: activityOptimization ?? this.activityOptimization,
    stationaryGpsOff: stationaryGpsOff ?? this.stationaryGpsOff,
    stationaryDelay: stationaryDelay ?? this.stationaryDelay,
    minAccuracyMeters: minAccuracyMeters ?? this.minAccuracyMeters,
    filterDuplicates: filterDuplicates ?? this.filterDuplicates,
    duplicateDistanceMeters:
        duplicateDistanceMeters ?? this.duplicateDistanceMeters,
    geofenceOptimization: geofenceOptimization ?? this.geofenceOptimization,
    smartHeartbeat: smartHeartbeat ?? this.smartHeartbeat,
    maxHeartbeatInterval: maxHeartbeatInterval ?? this.maxHeartbeatInterval,
    minHeartbeatInterval: minHeartbeatInterval ?? this.minHeartbeatInterval,
  );
}