copyWith method

ModelSettings copyWith({
  1. TextureFamily? textures,
  2. bool? mips,
  3. List<double>? lods,
  4. bool? impostor,
  5. int? chunks,
  6. bool clearChunks = false,
})

A copy with the given fields replaced. A clear… flag resets that nullable field to null, which passing null cannot say.

Implementation

ModelSettings copyWith({
  TextureFamily? textures,
  bool? mips,
  List<double>? lods,
  bool? impostor,
  int? chunks,
  bool clearChunks = false,
}) => ModelSettings(
  textures: textures ?? this.textures,
  mips: mips ?? this.mips,
  lods: lods ?? this.lods,
  impostor: impostor ?? this.impostor,
  chunks: clearChunks ? null : (chunks ?? this.chunks),
);