copyWith method

Marker copyWith({
  1. LatLng? point,
  2. Widget? child,
  3. double? width,
  4. double? height,
  5. Alignment? alignment,
  6. bool? rotate,
})

Implementation

Marker copyWith({
  LatLng? point,
  Widget? child,
  double? width,
  double? height,
  Alignment? alignment,
  bool? rotate,
}) {
  final marker = this;
  if (marker is InteractiveMarker) {
    return marker.copyWith(
      point: point,
      child: child,
      width: width,
      height: height,
      alignment: alignment,
      rotate: rotate,
    );
  }
  return Marker(
    key: key,
    point: point ?? this.point,
    child: child ?? this.child,
    width: width ?? this.width,
    height: height ?? this.height,
    alignment: alignment ?? this.alignment,
    rotate: rotate ?? this.rotate,
  );
}