copyWith method
Marker
copyWith({
- double? alphaParam,
- Offset? anchorParam,
- bool? clickableParam,
- bool? draggableParam,
- BitmapDescriptor? iconParam,
- bool? infoWindowEnableParam,
- InfoWindow? infoWindowParam,
- LatLng? positionParam,
- double? rotationParam,
- bool? visibleParam,
- ArgumentCallback<
String?> ? onTapParam, - MarkerDragEndCallback? onDragEndParam,
copy的真正复制的参数,主要用于需要修改某个属性参数时使用
Implementation
Marker copyWith({
double? alphaParam,
Offset? anchorParam,
bool? clickableParam,
bool? draggableParam,
BitmapDescriptor? iconParam,
bool? infoWindowEnableParam,
InfoWindow? infoWindowParam,
LatLng? positionParam,
double? rotationParam,
bool? visibleParam,
ArgumentCallback<String?>? onTapParam,
MarkerDragEndCallback? onDragEndParam,
}) {
Marker copyMark = Marker(
alpha: alphaParam ?? alpha,
anchor: anchorParam ?? anchor,
clickable: clickableParam ?? clickable,
draggable: draggableParam ?? draggable,
icon: iconParam ?? icon,
infoWindowEnable: infoWindowEnableParam ?? infoWindowEnable,
infoWindow: infoWindowParam ?? infoWindow,
position: positionParam ?? position,
rotation: rotationParam ?? rotation,
visible: visibleParam ?? visible,
zIndex: zIndex,
onTap: onTapParam ?? onTap,
onDragEnd: onDragEndParam ?? onDragEnd,
);
copyMark.setIdForCopy(id);
return copyMark;
}