copyWith method

LocationSettings copyWith({
  1. LocationAccuracy? accuracy,
  2. double? distanceFilter,
  3. int? timeInterval,
  4. bool? enableBackgroundTracking,
  5. bool? showBackgroundNotification,
  6. String? notificationTitle,
  7. String? notificationText,
  8. bool? pauseLocationUpdatesAutomatically,
  9. bool? allowMockLocations,
})

Implementation

LocationSettings copyWith({
  LocationAccuracy? accuracy,
  double? distanceFilter,
  int? timeInterval,
  bool? enableBackgroundTracking,
  bool? showBackgroundNotification,
  String? notificationTitle,
  String? notificationText,
  bool? pauseLocationUpdatesAutomatically,
  bool? allowMockLocations,
}) {
  return LocationSettings(
    accuracy: accuracy ?? this.accuracy,
    distanceFilter: distanceFilter ?? this.distanceFilter,
    timeInterval: timeInterval ?? this.timeInterval,
    enableBackgroundTracking:
        enableBackgroundTracking ?? this.enableBackgroundTracking,
    showBackgroundNotification:
        showBackgroundNotification ?? this.showBackgroundNotification,
    notificationTitle: notificationTitle ?? this.notificationTitle,
    notificationText: notificationText ?? this.notificationText,
    pauseLocationUpdatesAutomatically: pauseLocationUpdatesAutomatically ??
        this.pauseLocationUpdatesAutomatically,
    allowMockLocations: allowMockLocations ?? this.allowMockLocations,
  );
}