copyWith method

UMediaValue copyWith({
  1. UMediaState? state,
  2. Duration? position,
  3. Duration? duration,
  4. Duration? bufferedPosition,
  5. List<UBufferedRange>? buffered,
  6. bool? isLive,
  7. Duration? liveOffset,
  8. double? speed,
  9. double? volume,
  10. bool? muted,
  11. int? width,
  12. int? height,
  13. int? rotationDegrees,
  14. List<UMediaTrack>? tracks,
  15. int? currentIndex,
  16. int? queueLength,
  17. bool? shuffle,
  18. URepeatMode? repeat,
  19. UPipState? pip,
  20. UMediaMetadata? metadata,
  21. UMediaError? error,
  22. 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),
);