copyWith method
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?,
);