copyWith method

PolylineOptions copyWith({
  1. List<GeoPoint>? points,
  2. LogicalPixel? width,
  3. Color? color,
  4. double? erasedPart,
  5. Optional<DashedPolylineOptions?>? dashedPolylineOptions,
  6. Optional<GradientPolylineOptions?>? gradientPolylineOptions,
  7. bool? visible,
  8. Optional<Object?>? userData,
  9. ZIndex? zIndex,
  10. Optional<LevelId?>? levelId,
})

Implementation

PolylineOptions copyWith({
  List<GeoPoint>? points,
  LogicalPixel? width,
  Color? color,
  double? erasedPart,
  Optional<DashedPolylineOptions?>? dashedPolylineOptions,
  Optional<GradientPolylineOptions?>? gradientPolylineOptions,
  bool? visible,
  Optional<Object?>? userData,
  ZIndex? zIndex,
  Optional<LevelId?>? levelId
}) {
  return PolylineOptions(
    points: points ?? this.points,
    width: width ?? this.width,
    color: color ?? this.color,
    erasedPart: erasedPart ?? this.erasedPart,
    dashedPolylineOptions: dashedPolylineOptions != null ? dashedPolylineOptions.value : this.dashedPolylineOptions,
    gradientPolylineOptions: gradientPolylineOptions != null ? gradientPolylineOptions.value : this.gradientPolylineOptions,
    visible: visible ?? this.visible,
    userData: userData != null ? userData.value : this.userData,
    zIndex: zIndex ?? this.zIndex,
    levelId: levelId != null ? levelId.value : this.levelId
  );
}