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