copyWith method

ConvertCommandSettings copyWith({
  1. List<String>? inputs,
  2. String? output,
  3. bool? dryRun,
  4. bool? overwrite,
  5. String? assetPrefix,
  6. bool? materials,
  7. String? reportPath,
  8. bool? json,
  9. ModelSettings? models,
  10. bool? split,
  11. bool clearAssetPrefix = false,
  12. bool clearReportPath = false,
})

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

Implementation

ConvertCommandSettings copyWith({
  List<String>? inputs,
  String? output,
  bool? dryRun,
  bool? overwrite,
  String? assetPrefix,
  bool? materials,
  String? reportPath,
  bool? json,
  ModelSettings? models,
  bool? split,
  bool clearAssetPrefix = false,
  bool clearReportPath = false,
}) => ConvertCommandSettings(
  inputs: inputs ?? this.inputs,
  output: output ?? this.output,
  dryRun: dryRun ?? this.dryRun,
  overwrite: overwrite ?? this.overwrite,
  assetPrefix: clearAssetPrefix ? null : (assetPrefix ?? this.assetPrefix),
  materials: materials ?? this.materials,
  reportPath: clearReportPath ? null : (reportPath ?? this.reportPath),
  json: json ?? this.json,
  models: models ?? this.models,
  split: split ?? this.split,
);