VideoConfig class

小视频配置 基于官方SDK的DPWidgetDrawParams(Android)和LCDDrawVideoVCConfig(iOS)

使用示例

基础配置:

final config = VideoConfig(
  showBackBtn: true,
  enableRefresh: true,
);

Android自定义样式:

final config = VideoConfig(
  showBackBtn: true,
  isShowActionBar: true,
  actionBarBackgroundColor: '#FF6200EE',
  fontSize: 16,
  isBold: true,
  topMargin: 20,
);

iOS自定义导航栏:

final config = VideoConfig(
  showBackBtn: true,
  isShowNavigationBar: true,
  navigationBarBackgroundColor: '#FFFFFF',
  navigationBarTitleColor: '#000000',
  navigationBarButtonColor: '#007AFF',
  statusBarStyle: 'darkContent',
);

一起看视频配置:

final config = VideoConfig(
  showBackBtn: true,
  watchTogetherRole: 'HOST',
  hostGroupId: 12345,
);

Constructors

VideoConfig({bool? showBackBtn, bool? isShowNeedTopMargin, int? topMargin, bool? isShowActionBar, int? fontSize, bool? isBold, String? actionBarBackgroundColor, bool? supportOrientationChange, bool? allowPanBack, bool? isShowNavigationBar, String? navigationBarBackgroundColor, String? navigationBarTitleColor, String? navigationBarButtonColor, String? statusBarStyle, int? adOffset, int? bottomOffset, bool? hideClose, int? progressBarStyle, String? customCategory, String? scene, int? titleTopMargin, int? titleLeftMargin, int? titleRightMargin, int? drawChannelType, bool? hideFollow, bool? hideChannelName, bool? enableRefresh, String? watchTogetherRole, int? hostGroupId, bool? showCloseButton, bool? hiddenGuideGeste, double? outBottomOffset, List<String>? featureValuesArr, String? recommandTabName, int? drawVCTabOptions, bool? shouldDisableFollowingFunc, bool? shouldHideTabBarView, bool? customRefresh, Map<String, double>? navBarInset, bool? hiddenPlayletTitleView, bool? hiddenPlayletEnterView})
const
VideoConfig.fromMap(Map<String, dynamic> map)
从Map创建配置
factory

Properties

actionBarBackgroundColor String?
ActionBar背景颜色(仅Android)
final
adOffset int?
广告偏移量(距离底部),单位dp
final
allowPanBack bool?
是否允许左滑返回(仅iOS)
final
bottomOffset int?
底部偏移量,单位dp
final
customCategory String?
自定义频道名称
final
customRefresh bool?
自定义刷新行为和手势(iOS专用)
final
drawChannelType int?
频道类型:1-推荐,2-关注,3-推荐+关注
final
drawVCTabOptions int?
需要展示的tab(iOS专用)
final
enableRefresh bool?
是否支持下拉刷新
final
featureValuesArr List<String>?
支持的返回内容的类型(iOS专用)
final
fontSize int?
字体大小(仅Android)
final
hashCode int
The hash code for this object.
no setterinherited
hiddenGuideGeste bool?
是否隐藏首次安装出现的引导手势图(iOS专用)
final
hiddenPlayletEnterView bool?
是否隐藏底部跳转区域(iOS专用)
final
hiddenPlayletTitleView bool?
是否隐藏短剧title(iOS专用)
final
hideChannelName bool?
是否隐藏频道名称
final
hideClose bool?
是否隐藏关闭按钮
final
hideFollow bool?
是否隐藏关注功能
final
hostGroupId int?
主控端GroupID(仅在一起看视频主控端生效)
final
isBold bool?
字体是否加粗(仅Android)
final
isShowActionBar bool?
是否展示ActionBar(仅Android)
final
isShowNavigationBar bool?
是否显示导航栏(仅iOS)
final
isShowNeedTopMargin bool?
是否显示距离顶部的距离参数(仅Android)
final
导航栏内边距配置(iOS专用)
final
导航栏背景颜色(仅iOS)
final
导航栏按钮颜色(仅iOS)
final
导航栏标题颜色(仅iOS)
final
outBottomOffset double?
外流进度条距离最低部的距离(iOS专用)
final
progressBarStyle int?
进度条样式:1-浅色(白色),2-深色(蓝色)
final
recommandTabName String?
个性化推荐关闭以后,推荐频道名称(iOS专用)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scene String?
场景标识
final
shouldDisableFollowingFunc bool?
是否屏蔽关注功能(iOS专用)
final
shouldHideTabBarView bool?
是否隐藏频道tab(iOS专用)
final
showBackBtn bool?
是否展示返回按钮
final
showCloseButton bool?
是否显示关闭按钮(iOS专用)
final
statusBarStyle String?
状态栏样式(仅iOS) 可选值:'default', 'lightContent', 'darkContent'
final
supportOrientationChange bool?
是否支持横竖屏切换(仅Android)
final
titleLeftMargin int?
标题栏左边距,单位dp
final
titleRightMargin int?
标题栏右边距,单位dp
final
titleTopMargin int?
标题栏上边距,单位dp
final
topMargin int?
距离顶部的距离,单位dp(仅Android)
final
watchTogetherRole String?
一起看视频角色:'NONE', 'HOST', 'USER'
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
转换为Map - 只包含非null的参数
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited