copyWith method
UMediaValue
copyWith({
- UMediaState? state,
- Duration? position,
- Duration? duration,
- Duration? bufferedPosition,
- List<
UBufferedRange> ? buffered, - bool? isLive,
- Duration? liveOffset,
- double? speed,
- double? volume,
- bool? muted,
- int? width,
- int? height,
- int? rotationDegrees,
- List<
UMediaTrack> ? tracks, - int? currentIndex,
- int? queueLength,
- bool? shuffle,
- URepeatMode? repeat,
- UPipState? pip,
- UMediaMetadata? metadata,
- UMediaError? error,
- bool clearError = false,
Implementation
UMediaValue copyWith({
UMediaState? state,
Duration? position,
Duration? duration,
Duration? bufferedPosition,
List<UBufferedRange>? buffered,
bool? isLive,
Duration? liveOffset,
double? speed,
double? volume,
bool? muted,
int? width,
int? height,
int? rotationDegrees,
List<UMediaTrack>? tracks,
int? currentIndex,
int? queueLength,
bool? shuffle,
URepeatMode? repeat,
UPipState? pip,
UMediaMetadata? metadata,
UMediaError? error,
bool clearError = false,
}) => UMediaValue(
state: state ?? this.state,
position: position ?? this.position,
duration: duration ?? this.duration,
bufferedPosition: bufferedPosition ?? this.bufferedPosition,
buffered: buffered ?? this.buffered,
isLive: isLive ?? this.isLive,
liveOffset: liveOffset ?? this.liveOffset,
speed: speed ?? this.speed,
volume: volume ?? this.volume,
muted: muted ?? this.muted,
width: width ?? this.width,
height: height ?? this.height,
rotationDegrees: rotationDegrees ?? this.rotationDegrees,
tracks: tracks ?? this.tracks,
currentIndex: currentIndex ?? this.currentIndex,
queueLength: queueLength ?? this.queueLength,
shuffle: shuffle ?? this.shuffle,
repeat: repeat ?? this.repeat,
pip: pip ?? this.pip,
metadata: metadata ?? this.metadata,
error: clearError ? null : (error ?? this.error),
);