copyWith method

AudioParams copyWith({
  1. Object? format = unset,
  2. Object? sampleRate = unset,
  3. Object? channels = unset,
  4. Object? channelCount = unset,
  5. Object? hrChannels = unset,
  6. Object? codec = unset,
  7. Object? codecName = unset,
})

Returns a copy with the given fields replaced. Pass null explicitly to clear a field; omitted fields keep their current value.

Implementation

AudioParams copyWith({
  Object? format = unset,
  Object? sampleRate = unset,
  Object? channels = unset,
  Object? channelCount = unset,
  Object? hrChannels = unset,
  Object? codec = unset,
  Object? codecName = unset,
}) => AudioParams(
  format: identical(format, unset) ? this.format : format as Format?,
  sampleRate: identical(sampleRate, unset)
      ? this.sampleRate
      : sampleRate as int?,
  channels: identical(channels, unset)
      ? this.channels
      : channels as Channels?,
  channelCount: identical(channelCount, unset)
      ? this.channelCount
      : channelCount as int?,
  hrChannels: identical(hrChannels, unset)
      ? this.hrChannels
      : hrChannels as String?,
  codec: identical(codec, unset) ? this.codec : codec as String?,
  codecName: identical(codecName, unset)
      ? this.codecName
      : codecName as String?,
);