VideoCardConfig.fromMap constructor
从Map创建配置
Implementation
factory VideoCardConfig.fromMap(Map<String, dynamic> map) {
return VideoCardConfig(
scene: map['scene'] as String?,
cardType: map['cardType'] as String?,
cardWidth: map['cardWidth'] as int?,
cardHeight: map['cardHeight'] as int?,
coverWidth: map['coverWidth'] as int?,
coverHeight: map['coverHeight'] as int?,
showTitle: map['showTitle'] as bool?,
showUserName: map['showUserName'] as bool?,
showPlayButton: map['showPlayButton'] as bool?,
showDuration: map['showDuration'] as bool?,
showViewCount: map['showViewCount'] as bool?,
showLikeCount: map['showLikeCount'] as bool?,
showCommentCount: map['showCommentCount'] as bool?,
showShareButton: map['showShareButton'] as bool?,
autoPlay: map['autoPlay'] as bool?,
loopPlay: map['loopPlay'] as bool?,
mutePlay: map['mutePlay'] as bool?,
preloadCount: map['preloadCount'] as int?,
cacheSize: map['cacheSize'] as int?,
networkType: map['networkType'] as int?,
backgroundColor: map['backgroundColor'] as String?,
titleColor: map['titleColor'] as String?,
userNameColor: map['userNameColor'] as String?,
playButtonColor: map['playButtonColor'] as String?,
statsColor: map['statsColor'] as String?,
borderColor: map['borderColor'] as String?,
borderWidth: map['borderWidth'] as int?,
cornerRadius: map['cornerRadius'] as int?,
padding: map['padding'] as int?,
margin: map['margin'] as int?,
enableShadow: map['enableShadow'] as bool?,
shadowColor: map['shadowColor'] as String?,
shadowOffsetX: map['shadowOffsetX'] as int?,
shadowOffsetY: map['shadowOffsetY'] as int?,
shadowBlurRadius: map['shadowBlurRadius'] as int?,
fontSize: map['fontSize'] as int?,
fontBold: map['fontBold'] as bool?,
titleMaxLines: map['titleMaxLines'] as int?,
userNameMaxLength: map['userNameMaxLength'] as int?,
);
}