copyWith method

VideoPlayerValue copyWith({
  1. Duration? duration,
  2. Size? size,
  3. Duration? position,
  4. DateTime? absolutePosition,
  5. List<DurationRange>? buffered,
  6. bool? isPlaying,
  7. bool? isLooping,
  8. bool? isBuffering,
  9. double? volume,
  10. String? errorDescription,
  11. double? speed,
  12. bool? isPip,
})

Returns a new instance that has the same values as this current instance, except for any overrides passed in as arguments to copyWidth.

Implementation

VideoPlayerValue copyWith({
  Duration? duration,
  Size? size,
  Duration? position,
  DateTime? absolutePosition,
  List<DurationRange>? buffered,
  bool? isPlaying,
  bool? isLooping,
  bool? isBuffering,
  double? volume,
  String? errorDescription,
  double? speed,
  bool? isPip,
}) {
  return VideoPlayerValue(
    duration: duration ?? this.duration,
    size: size ?? this.size,
    position: position ?? this.position,
    absolutePosition: absolutePosition ?? this.absolutePosition,
    buffered: buffered ?? this.buffered,
    isPlaying: isPlaying ?? this.isPlaying,
    isLooping: isLooping ?? this.isLooping,
    isBuffering: isBuffering ?? this.isBuffering,
    volume: volume ?? this.volume,
    speed: speed ?? this.speed,
    errorDescription: errorDescription ?? this.errorDescription,
    isPip: isPip ?? this.isPip,
  );
}