copyWith method

OpenMapOptions copyWith({
  1. Crs? crs,
  2. double? zoom,
  3. double? rotation,
  4. bool? debugMultiFingerGestureWinner,
  5. bool? enableMultiFingerGestureRace,
  6. double? rotationThreshold,
  7. int? rotationWinGestures,
  8. double? pinchZoomThreshold,
  9. int? pinchZoomWinGestures,
  10. double? pinchMoveThreshold,
  11. int? pinchMoveWinGestures,
  12. bool? enableScrollWheel,
  13. double? minZoom,
  14. double? maxZoom,
  15. int? interactiveFlags,
  16. LatLngBounds? maxBounds,
  17. bool? keepAlive,
  18. LongPressCallback? onLongPress,
  19. PositionCallback? onPositionChanged,
  20. bool? slideOnBoundaries,
  21. Size? screenSize,
  22. bool? adaptiveBoundaries,
  23. LatLng? swPanBoundary,
  24. LatLng? nePanBoundary,
})

Implementation

OpenMapOptions copyWith({
  Crs? crs,
  double? zoom,
  double? rotation,
  bool? debugMultiFingerGestureWinner,
  bool? enableMultiFingerGestureRace,
  double? rotationThreshold,
  int? rotationWinGestures,
  double? pinchZoomThreshold,
  int? pinchZoomWinGestures,
  double? pinchMoveThreshold,
  int? pinchMoveWinGestures,
  bool? enableScrollWheel,
  double? minZoom,
  double? maxZoom,
  int? interactiveFlags,
  LatLngBounds? maxBounds,
  bool? keepAlive,
  LongPressCallback? onLongPress,
  PositionCallback? onPositionChanged,
  bool? slideOnBoundaries,
  Size? screenSize,
  bool? adaptiveBoundaries,
  LatLng? swPanBoundary,
  LatLng? nePanBoundary,
}) {
  if (_bounds != null) {
    return OpenMapOptions.bounds(
      crs: crs ?? this.crs,
      zoom: zoom ?? this.zoom,
      rotation: rotation ?? this.rotation,
      debugMultiFingerGestureWinner:
          debugMultiFingerGestureWinner ?? this.debugMultiFingerGestureWinner,
      enableMultiFingerGestureRace:
          enableMultiFingerGestureRace ?? this.enableMultiFingerGestureRace,
      rotationThreshold: rotationThreshold ?? this.rotationThreshold,
      rotationWinGestures: rotationWinGestures ?? this.rotationWinGestures,
      pinchZoomThreshold: pinchZoomThreshold ?? this.pinchZoomThreshold,
      pinchZoomWinGestures: pinchZoomWinGestures ?? this.pinchZoomWinGestures,
      pinchMoveThreshold: pinchMoveThreshold ?? this.pinchMoveThreshold,
      pinchMoveWinGestures: pinchMoveWinGestures ?? this.pinchMoveWinGestures,
      enableScrollWheel: enableScrollWheel ?? this.enableScrollWheel,
      minZoom: minZoom ?? this.minZoom,
      maxZoom: maxZoom ?? this.maxZoom,
      interactiveFlags: interactiveFlags ?? this.interactiveFlags,
      maxBounds: maxBounds ?? this.maxBounds,
      keepAlive:
          keepAlive ?? this.keepAlive,
      onLongPress: onLongPress ?? this.onLongPress,
      onPositionChanged: onPositionChanged ?? this.onPositionChanged,
      slideOnBoundaries: slideOnBoundaries ?? this.slideOnBoundaries,
      screenSize: screenSize ?? this.screenSize,
      adaptiveBoundaries: adaptiveBoundaries ?? this.adaptiveBoundaries,
      bounds: _bounds!,
      boundsOptions: _boundsOptions,
      swPanBoundary: swPanBoundary ?? this.swPanBoundary,
      nePanBoundary: nePanBoundary ?? this.nePanBoundary,
    );
  }
  return OpenMapOptions(
    crs: crs ?? this.crs,
    zoom: zoom ?? this.zoom,
    rotation: rotation ?? this.rotation,
    debugMultiFingerGestureWinner:
        debugMultiFingerGestureWinner ?? this.debugMultiFingerGestureWinner,
    enableMultiFingerGestureRace:
        enableMultiFingerGestureRace ?? this.enableMultiFingerGestureRace,
    rotationThreshold: rotationThreshold ?? this.rotationThreshold,
    rotationWinGestures: rotationWinGestures ?? this.rotationWinGestures,
    pinchZoomThreshold: pinchZoomThreshold ?? this.pinchZoomThreshold,
    pinchZoomWinGestures: pinchZoomWinGestures ?? this.pinchZoomWinGestures,
    pinchMoveThreshold: pinchMoveThreshold ?? this.pinchMoveThreshold,
    pinchMoveWinGestures: pinchMoveWinGestures ?? this.pinchMoveWinGestures,
    enableScrollWheel: enableScrollWheel ?? this.enableScrollWheel,
    minZoom: minZoom ?? this.minZoom,
    maxZoom: maxZoom ?? this.maxZoom,
    interactiveFlags: interactiveFlags ?? this.interactiveFlags,
    maxBounds: maxBounds ?? this.maxBounds,
    keepAlive:
        keepAlive ?? this.keepAlive,
    onLongPress: onLongPress ?? this.onLongPress,
    onPositionChanged: onPositionChanged ?? this.onPositionChanged,
    slideOnBoundaries: slideOnBoundaries ?? this.slideOnBoundaries,
    screenSize: screenSize ?? this.screenSize,
    adaptiveBoundaries: adaptiveBoundaries ?? this.adaptiveBoundaries,
    center: _center,
    swPanBoundary: swPanBoundary ?? this.swPanBoundary,
    nePanBoundary: nePanBoundary ?? this.nePanBoundary,
  );
}