copyWith method

ModelMapObjectOptions copyWith({
  1. GeoPointWithElevation? position,
  2. Optional<ModelData?>? data,
  3. ModelSize? size,
  4. Optional<MapDirection?>? mapDirection,
  5. Opacity? opacity,
  6. bool? visible,
  7. Optional<Object?>? userData,
  8. Optional<LevelId?>? levelId,
})

Implementation

ModelMapObjectOptions copyWith({
  GeoPointWithElevation? position,
  Optional<ModelData?>? data,
  ModelSize? size,
  Optional<MapDirection?>? mapDirection,
  Opacity? opacity,
  bool? visible,
  Optional<Object?>? userData,
  Optional<LevelId?>? levelId
}) {
  return ModelMapObjectOptions(
    position: position ?? this.position,
    data: data != null ? data.value : this.data,
    size: size ?? this.size,
    mapDirection: mapDirection != null ? mapDirection.value : this.mapDirection,
    opacity: opacity ?? this.opacity,
    visible: visible ?? this.visible,
    userData: userData != null ? userData.value : this.userData,
    levelId: levelId != null ? levelId.value : this.levelId
  );
}