fPanelBuilder function
FPanelWidgetBuilder
fPanelBuilder({
- Key? key,
- bool fill = false,
- bool isVideos = false,
- List<
VideoItem> ? videoList, - int videoIndex = 0,
- void playNextVideoFun()?,
- String title = '',
- String subTitle = '',
- int duration = 5000,
- bool doubleTap = true,
- bool isRightButton = false,
- List<
Widget> ? rightButtonList, - bool isSnapShot = false,
- bool isCaption = false,
- Map<
String, double> ? speedList, - bool isResolution = false,
- Map<
String, ResolutionItem> ? resolutionList, - IconData settingIcon = Icons.settings,
- void settingFun()?,
- void onError()?,
- void onVideoEnd()?,
- void onVideoPrepared(
- Size?
- void onVideoTimeChange()?,
Implementation
FPanelWidgetBuilder fPanelBuilder({
Key? key,
final bool fill = false,
/// 是否展示视频列表
final bool isVideos = false,
/// 视频列表
final List<VideoItem>? videoList,
final int videoIndex = 0,
/// 全屏点击下一集按钮事件
final void Function()? playNextVideoFun,
/// 视频标题
final String title = '',
/// 视频副标题
final String subTitle = '',
final int duration = 5000,
final bool doubleTap = true,
/// 中间区域右上方按钮是否展示
final bool isRightButton = false,
/// 中间区域右上方按钮Widget集合
final List<Widget>? rightButtonList,
/// 截屏按钮是否展示
final bool isSnapShot = false,
/// 字幕按钮是否展示
final bool isCaption = false,
/// 倍速列表,注意这里一定要包含1倍速
final Map<String, double>? speedList,
/// 清晰度按钮是否展示
final bool isResolution = false,
/// 清晰度列表
final Map<String, ResolutionItem>? resolutionList,
/// 设置图标
final IconData settingIcon = Icons.settings,
/// 设置点击事件
final void Function()? settingFun,
/// 视频错误点击刷新
final void Function()? onError,
/// 视频结束
final void Function()? onVideoEnd,
/// 视频完成后台任务到稳定期
final void Function(Size?)? onVideoPrepared,
/// 视频时间更新
final void Function()? onVideoTimeChange,
}) {
return (FPlayer player, FData data, BuildContext context, Size viewSize,
Rect texturePos) {
return _FPanel2(
key: key,
player: player,
data: data,
isVideos: isVideos,
title: title,
subTitle: subTitle,
videoList: videoList,
videoIndex: videoIndex,
playNextVideoFun: playNextVideoFun,
isRightButton: isRightButton,
rightButtonList: rightButtonList,
viewSize: viewSize,
texPos: texturePos,
fill: fill,
doubleTap: doubleTap,
isSnapShot: isSnapShot,
hideDuration: duration,
isCaption: isCaption,
speedList: speedList,
isResolution: isResolution,
resolutionList: resolutionList,
settingIcon: settingIcon,
settingFun: settingFun,
onError: onError,
onVideoEnd: onVideoEnd,
onVideoPrepared: onVideoPrepared,
onVideoTimeChange: onVideoTimeChange,
);
};
}