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