copyWith method

MapOptions copyWith({
  1. CameraPosition? position,
  2. CameraPositionPoint? positionPoint,
  3. CameraZoomRestrictions? zoomRestrictions,
  4. Optional<DevicePpi?>? devicePPI,
  5. Optional<DeviceDensity?>? deviceDensity,
  6. Optional<List<Source>?>? sources,
  7. Optional<Style?>? style,
  8. Optional<CancelableOperation<Style>?>? styleFuture,
  9. MapAppearance? appearance,
  10. Optional<Fps?>? maxFps,
  11. Optional<Fps?>? powerSavingMaxFps,
  12. Optional<Color?>? backgroundColor,
})

Implementation

MapOptions copyWith({
  sdk.CameraPosition? position,
  sdk.CameraPositionPoint? positionPoint,
  sdk.CameraZoomRestrictions? zoomRestrictions,
  Optional<sdk.DevicePpi?>? devicePPI,
  Optional<sdk.DeviceDensity?>? deviceDensity,
  Optional<List<sdk.Source>?>? sources,
  Optional<sdk.Style?>? style,
  Optional<CancelableOperation<sdk.Style>?>? styleFuture,
  MapAppearance? appearance,
  Optional<sdk.Fps?>? maxFps,
  Optional<sdk.Fps?>? powerSavingMaxFps,
  Optional<Color?>? backgroundColor,
}) {
  return MapOptions(
    position: position ?? this.position,
    positionPoint: positionPoint ?? this.positionPoint,
    devicePPI: devicePPI != null ? devicePPI.value : this.devicePPI,
    deviceDensity:
        deviceDensity != null ? deviceDensity.value : this.deviceDensity,
    sources: sources != null ? sources.value : this.sources,
    style: style != null ? style.value : this.style,
    styleFuture: styleFuture != null ? styleFuture.value : this.styleFuture,
    appearance: appearance ?? this.appearance,
    maxFps: maxFps != null ? maxFps.value : this.maxFps,
    powerSavingMaxFps: powerSavingMaxFps != null
        ? powerSavingMaxFps.value
        : this.powerSavingMaxFps,
    backgroundColor: backgroundColor != null
        ? backgroundColor.value
        : this.backgroundColor,
  );
}