copyWith method

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

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,
  List<DurationRange>? buffered,
  bool? isPlaying,
  bool? isLooping,
  bool? isBuffering,
  bool? isMuted,
  double? volume,
  String? errorDescription,
}) {
  return VideoPlayerValue(
    duration: duration ?? this.duration,
    size: size ?? this.size,
    position: position ?? this.position,
    buffered: buffered ?? this.buffered,
    isPlaying: isPlaying ?? this.isPlaying,
    isLooping: isLooping ?? this.isLooping,
    isBuffering: isBuffering ?? this.isBuffering,
    isMuted: isMuted ?? this.isMuted,
    volume: volume ?? this.volume,
    errorDescription: errorDescription ?? this.errorDescription,
  );
}