copyWith method
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,
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,
);
}