copyWith method

BetterPlayerDataSource copyWith({
  1. BetterPlayerDataSourceType? type,
  2. String? url,
  3. List<int>? bytes,
  4. List<BetterPlayerSubtitlesSource>? subtitles,
  5. bool? liveStream,
  6. Map<String, String>? headers,
  7. bool? useAsmsSubtitles,
  8. bool? useAsmsTracks,
  9. bool? useAsmsAudioTracks,
  10. Map<String, String>? resolutions,
  11. BetterPlayerCacheConfiguration? cacheConfiguration,
  12. BetterPlayerNotificationConfiguration? notificationConfiguration = const BetterPlayerNotificationConfiguration(showNotification: false),
  13. Duration? overriddenDuration,
  14. BetterPlayerVideoFormat? videoFormat,
  15. String? videoExtension,
  16. BetterPlayerDrmConfiguration? drmConfiguration,
  17. Widget? placeholder,
  18. BetterPlayerBufferingConfiguration? bufferingConfiguration = const BetterPlayerBufferingConfiguration(),
})

Implementation

BetterPlayerDataSource copyWith({
  BetterPlayerDataSourceType? type,
  String? url,
  List<int>? bytes,
  List<BetterPlayerSubtitlesSource>? subtitles,
  bool? liveStream,
  Map<String, String>? headers,
  bool? useAsmsSubtitles,
  bool? useAsmsTracks,
  bool? useAsmsAudioTracks,
  Map<String, String>? resolutions,
  BetterPlayerCacheConfiguration? cacheConfiguration,
  BetterPlayerNotificationConfiguration? notificationConfiguration =
      const BetterPlayerNotificationConfiguration(showNotification: false),
  Duration? overriddenDuration,
  BetterPlayerVideoFormat? videoFormat,
  String? videoExtension,
  BetterPlayerDrmConfiguration? drmConfiguration,
  Widget? placeholder,
  BetterPlayerBufferingConfiguration? bufferingConfiguration =
      const BetterPlayerBufferingConfiguration(),
}) {
  return BetterPlayerDataSource(
    type ?? this.type,
    url ?? this.url,
    bytes: bytes ?? this.bytes,
    subtitles: subtitles ?? this.subtitles,
    liveStream: liveStream ?? this.liveStream,
    headers: headers ?? this.headers,
    useAsmsSubtitles: useAsmsSubtitles ?? this.useAsmsSubtitles,
    useAsmsTracks: useAsmsTracks ?? this.useAsmsTracks,
    useAsmsAudioTracks: useAsmsAudioTracks ?? this.useAsmsAudioTracks,
    resolutions: resolutions ?? this.resolutions,
    cacheConfiguration: cacheConfiguration ?? this.cacheConfiguration,
    notificationConfiguration:
        notificationConfiguration ?? this.notificationConfiguration,
    overriddenDuration: overriddenDuration ?? this.overriddenDuration,
    videoFormat: videoFormat ?? this.videoFormat,
    videoExtension: videoExtension ?? this.videoExtension,
    drmConfiguration: drmConfiguration ?? this.drmConfiguration,
    placeholder: placeholder ?? this.placeholder,
    bufferingConfiguration:
        bufferingConfiguration ?? this.bufferingConfiguration,
  );
}