copyWith method

PipFlutterPlayerDataSource copyWith({
  1. PipFlutterPlayerDataSourceType? type,
  2. String? url,
  3. List<int>? bytes,
  4. List<PipFlutterPlayerSubtitlesSource>? subtitles,
  5. bool? liveStream,
  6. Map<String, String>? headers,
  7. bool? useAsmsSubtitles,
  8. bool? useAsmsTracks,
  9. bool? useAsmsAudioTracks,
  10. Map<String, String>? resolutions,
  11. PipFlutterPlayerCacheConfiguration? cacheConfiguration,
  12. PipFlutterPlayerNotificationConfiguration? notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false),
  13. Duration? overriddenDuration,
  14. PipFlutterPlayerVideoFormat? videoFormat,
  15. String? videoExtension,
  16. PipFlutterPlayerDrmConfiguration? drmConfiguration,
  17. Widget? placeholder,
  18. PipFlutterPlayerBufferingConfiguration? bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration(),
})

Implementation

PipFlutterPlayerDataSource copyWith({
  PipFlutterPlayerDataSourceType? type,
  String? url,
  List<int>? bytes,
  List<PipFlutterPlayerSubtitlesSource>? subtitles,
  bool? liveStream,
  Map<String, String>? headers,
  bool? useAsmsSubtitles,
  bool? useAsmsTracks,
  bool? useAsmsAudioTracks,
  Map<String, String>? resolutions,
  PipFlutterPlayerCacheConfiguration? cacheConfiguration,
  PipFlutterPlayerNotificationConfiguration? notificationConfiguration =
      const PipFlutterPlayerNotificationConfiguration(
          showNotification: false),
  Duration? overriddenDuration,
  PipFlutterPlayerVideoFormat? videoFormat,
  String? videoExtension,
  PipFlutterPlayerDrmConfiguration? drmConfiguration,
  Widget? placeholder,
  PipFlutterPlayerBufferingConfiguration? bufferingConfiguration =
      const PipFlutterPlayerBufferingConfiguration(),
}) {
  return PipFlutterPlayerDataSource(
    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,
  );
}