Input constructor Null safety

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

Builds 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

const Input(
    {required this.id,
    this.src,
    this.filePath,
    this.previewFilePath,
    InputType? type,
    InputType? type1,
    InputType? type2,
    required this.channel,
    required this.sampler,
    required this.published})
    : type1 = type ?? type1,
      type2 = type ?? type2;