copyWith method

Input copyWith({
  1. String? id,
  2. String? src,
  3. String? filePath,
  4. String? previewFilePath,
  5. InputType? type,
  6. InputType? type1,
  7. InputType? type2,
  8. int? channel,
  9. Sampler? sampler,
  10. int? published,
})

Builds a copy of a Input

  • id: The input id
  • src: The source
  • filePath: The file path
  • previewFilePath: The preview file path
  • type: The type. If present type1 and type2 values are ignored and both fields set with type
  • type1: The type1
  • type2: The type2
  • channel: The channel number
  • sampler: The sampler
  • published: The published

Implementation

Input copyWith({
  String? id,
  String? src,
  String? filePath,
  String? previewFilePath,
  InputType? type,
  InputType? type1,
  InputType? type2,
  int? channel,
  Sampler? sampler,
  int? published,
}) {
  return Input(
    id: id ?? this.id,
    src: src ?? this.src,
    filePath: filePath ?? this.filePath,
    previewFilePath: previewFilePath ?? this.previewFilePath,
    type1: (type ?? type1) ?? this.type1,
    type2: (type ?? type2) ?? this.type2,
    channel: channel ?? this.channel,
    sampler: sampler ?? this.sampler,
    published: published ?? this.published,
  );
}