copyWith method

TPStreamsPlayerValue copyWith({
  1. Duration? duration,
  2. Duration? position,
  3. bool? isLoading,
  4. bool? isPlaying,
  5. bool? isBuffering,
  6. bool? isEnded,
  7. TPStreamsError? error,
})

Implementation

TPStreamsPlayerValue copyWith(
    {Duration? duration,
    Duration? position,
    bool? isLoading,
    bool? isPlaying,
    bool? isBuffering,
    bool? isEnded,
    TPStreamsError? error}) {
  return TPStreamsPlayerValue(
      duration: duration ?? this.duration,
      position: position ?? this.position,
      isLoading: isLoading ?? this.isLoading,
      isPlaying: isPlaying ?? this.isPlaying,
      isBuffering: isBuffering ?? this.isBuffering,
      isEnded: isEnded ?? this.isEnded,
      error: error ?? this.error);
}