copyWith method

PolygonOptions copyWith({
  1. List<List<GeoPoint>>? contours,
  2. Color? color,
  3. LogicalPixel? strokeWidth,
  4. Color? strokeColor,
  5. bool? visible,
  6. Optional<Object?>? userData,
  7. ZIndex? zIndex,
  8. Optional<LevelId?>? levelId,
})

Implementation

PolygonOptions copyWith({
  List<List<GeoPoint>>? contours,
  Color? color,
  LogicalPixel? strokeWidth,
  Color? strokeColor,
  bool? visible,
  Optional<Object?>? userData,
  ZIndex? zIndex,
  Optional<LevelId?>? levelId
}) {
  return PolygonOptions(
    contours: contours ?? this.contours,
    color: color ?? this.color,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    strokeColor: strokeColor ?? this.strokeColor,
    visible: visible ?? this.visible,
    userData: userData != null ? userData.value : this.userData,
    zIndex: zIndex ?? this.zIndex,
    levelId: levelId != null ? levelId.value : this.levelId
  );
}