StreamFullScreenMediaBuilder constructor
const
StreamFullScreenMediaBuilder({
- Key? key,
- required List<
StreamAttachmentPackage> mediaAttachmentPackages, - required int startIndex,
- required String userName,
- ShowMessageCallback? onShowMessage,
- ReplyMessageCallback? onReplyMessage,
- AttachmentActionsBuilder? attachmentActionsModalBuilder,
- bool autoplayVideos = false,
A wrapper widget for conditionally providing the proper StreamFullScreenMedia widget when writing an application that targets all available Flutter platforms (Android, iOS, macOS, Windows, Linux, & Web).
This is required because:
package:video_player
andpackage:chewie
do not support macOS, Windows, & Linux, but do support Android, iOS, & Web.package:dart_vlc
does support macOS, Windows, & Linux via FFI. This has the unfortunate consequence of not supporting Web.
This widget makes use of dart's conditional imports to ensure that Stream's
desktop implementation of StreamFullScreenMedia is not imported when
building applications that target web. Additionally, this widget ensures
that applications targeting mobile platforms do not build the version of
StreamFullScreenMedia that targets desktop platforms (even though
package:dart_vlc
technically supports iOS).
Implementation
const StreamFullScreenMediaBuilder({
super.key,
required this.mediaAttachmentPackages,
required this.startIndex,
required this.userName,
this.onShowMessage,
this.onReplyMessage,
this.attachmentActionsModalBuilder,
this.autoplayVideos = false,
});