copyWith method

JWVideoPlayerValue copyWith({
  1. Duration? duration,
  2. Size? size,
  3. Duration? position,
  4. bool? isInitialized,
  5. String? errorDescription,
  6. double? bufferPercentage,
  7. double? bufferPosition,
  8. PlayerState? state,
})

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

Implementation

JWVideoPlayerValue copyWith(
    {Duration? duration,
    Size? size,
    Duration? position,
    bool? isInitialized,
    String? errorDescription,
    double? bufferPercentage,
    double? bufferPosition,
    PlayerState? state}) {
  return JWVideoPlayerValue(
      duration: duration ?? this.duration,
      size: size ?? this.size,
      position: position ?? this.position,
      bufferPercentage: bufferPercentage ?? this.bufferPercentage,
      bufferPosition: bufferPosition ?? this.bufferPosition,
      isInitialized: isInitialized ?? this.isInitialized,
      errorDescription: errorDescription ?? this.errorDescription,
      state: state ?? this.state);
}