copyWith method

MapSettings copyWith({
  1. bool? showLocalPlaces,
  2. bool? showEncryptedPlaces,
  3. bool? hideAllMarkers,
  4. Color? userPlacesColor,
  5. Color? localPlacesColor,
  6. Color? encryptedPlacesColor,
  7. MapSource? mapSource,
  8. bool? rememberViewport,
  9. double? initialLat,
  10. double? initialLng,
  11. double? initialZoom,
})

Creates a copy with optional overrides.

Implementation

MapSettings copyWith({
  bool? showLocalPlaces,
  bool? showEncryptedPlaces,
  bool? hideAllMarkers,
  Color? userPlacesColor,
  Color? localPlacesColor,
  Color? encryptedPlacesColor,
  MapSource? mapSource,
  bool? rememberViewport,
  double? initialLat,
  double? initialLng,
  double? initialZoom,
}) {
  return MapSettings(
    showLocalPlaces: showLocalPlaces ?? this.showLocalPlaces,
    showEncryptedPlaces: showEncryptedPlaces ?? this.showEncryptedPlaces,
    hideAllMarkers: hideAllMarkers ?? this.hideAllMarkers,
    userPlacesColor: userPlacesColor ?? this.userPlacesColor,
    localPlacesColor: localPlacesColor ?? this.localPlacesColor,
    encryptedPlacesColor: encryptedPlacesColor ?? this.encryptedPlacesColor,
    mapSource: mapSource ?? this.mapSource,
    rememberViewport: rememberViewport ?? this.rememberViewport,
    initialLat: initialLat ?? this.initialLat,
    initialLng: initialLng ?? this.initialLng,
    initialZoom: initialZoom ?? this.initialZoom,
  );
}