Videos.single constructor
Videos.single is Used For Only playing a single Video
Videos.single(videoPath:'path or url',type: type); // default type is VideoType.Network
videoPath String
type VideoType
Implementation
Videos.single({
required String videoPath,
VideoType type = VideoType.network,
}) {
switch (type) {
case VideoType.file:
if (kIsWeb) throw 'VideoType.file can\'t be used in web platform';
videos = [Media('file:///$videoPath')];
break;
case VideoType.assets:
videos = [Media('asset:///$videoPath')];
break;
default:
videos = [Media(videoPath)];
}
}