copyWith method

MapOptions copyWith({
  1. Crs? crs,
  2. Size? size,
  3. dynamic center,
  4. ZoomOptions? zoomOptions,
  5. double? rotation,
  6. bool? disableRotation,
  7. bool? showCenterMarker,
  8. num? centerMarkerSize,
  9. dynamic centerMarker,
  10. bool? live,
  11. bool? moveWhenLive,
  12. bool? showLocator,
  13. Locator? locator,
  14. dynamic locationMarker,
  15. num? locationMarkerSize,
  16. bool? showLocationMarker,
  17. bool? showLocationIndicator,
  18. LocationIndicator? locationIndicator,
  19. bool? showCompass,
  20. Compass? compass,
  21. bool? showScale,
  22. Scale? scale,
  23. bool? interactive,
  24. LatLngBounds? maxBounds,
  25. LatLngBounds? fitBounds,
  26. FitBoundsOptions? fitBoundsOptions,
  27. bool? slideOnBoundaries,
  28. bool? adaptiveBoundaries,
  29. dynamic onTap(
    1. LatLng?
    )?,
  30. dynamic onLongPress(
    1. LatLng?
    )?,
  31. MapChangedCallback? onChanged,
  32. Function? onReady,
  33. String? attribution,
  34. bool? hideAttribution,
})

Implementation

MapOptions copyWith({
  Crs? crs,
  Size? size,
  dynamic center,
  ZoomOptions? zoomOptions,
  double? rotation,
  bool? disableRotation,
  bool? showCenterMarker,
  num? centerMarkerSize,
  dynamic centerMarker,
  bool? live,
  bool? moveWhenLive,
  bool? showLocator,
  Locator? locator,
  dynamic locationMarker,
  num? locationMarkerSize,
  bool? showLocationMarker,
  bool? showLocationIndicator,
  LocationIndicator? locationIndicator,
  bool? showCompass,
  Compass? compass,
  bool? showScale,
  Scale? scale,
  bool? interactive,
  LatLngBounds? maxBounds,
  LatLngBounds? fitBounds,
  FitBoundsOptions? fitBoundsOptions,
  bool? slideOnBoundaries,
  bool? adaptiveBoundaries,
  Function(LatLng?)? onTap,
  Function(LatLng?)? onLongPress,
  MapChangedCallback? onChanged,
  Function? onReady,
  String? attribution,
  bool? hideAttribution,
}) =>
    MapOptions(
      crs: crs ?? this.crs,
      size: size ?? this.size,
      center: center ?? this.center ?? centerQuery,
      zoomOptions: zoomOptions ?? this.zoomOptions,
      rotation: rotation ?? this.rotation,
      disableRotation: disableRotation ?? this.disableRotation,
      showCenterMarker: showCenterMarker ?? this.showCenterMarker,
      centerMarkerSize: centerMarkerSize?.toDouble() ?? this.centerMarkerSize,
      centerMarker: centerMarker ?? this.centerMarker,
      locationMarker: locationMarker ?? this.locationMarker,
      locationMarkerSize:
          locationMarkerSize?.toDouble() ?? this.locationMarkerSize,
      live: live ?? this.live,
      moveWhenLive: moveWhenLive ?? this.moveWhenLive,
      locator: locator ?? this.locator,
      showLocator: showLocator ?? this.showLocator,
      locationIndicator: locationIndicator ?? this.locationIndicator,
      showLocationIndicator:
          showLocationIndicator ?? this.showLocationIndicator,
      showLocationMarker: showLocationMarker ?? this.showLocationMarker,
      compass: compass ?? this.compass,
      showCompass: showCompass ?? this.showCompass,
      scale: scale ?? this.scale,
      showScale: showScale ?? this.showScale,
      interactive: interactive ?? this.interactive,
      maxBounds: maxBounds ?? this.maxBounds,
      fitBounds: fitBounds ?? this.fitBounds,
      fitBoundsOptions: fitBoundsOptions ?? this.fitBoundsOptions,
      slideOnBoundaries: slideOnBoundaries ?? this.slideOnBoundaries,
      adaptiveBoundaries: adaptiveBoundaries ?? this.adaptiveBoundaries,
      onTap: onTap ?? this.onTap,
      onLongPress: onLongPress ?? this.onLongPress,
      onChanged: onChanged ?? this.onChanged,
      onReady: onReady ?? this.onReady,
      attribution: attribution ?? this.attribution,
      hideAttribution: hideAttribution ?? this.hideAttribution,
    );