toMap method
转换为Map - 只包含非null的参数
Implementation
Map<String, dynamic> toMap() {
final Map<String, dynamic> map = {};
if (scene != null) map['scene'] = scene;
if (cardType != null) map['cardType'] = cardType;
if (cardWidth != null) map['cardWidth'] = cardWidth;
if (cardHeight != null) map['cardHeight'] = cardHeight;
if (coverWidth != null) map['coverWidth'] = coverWidth;
if (coverHeight != null) map['coverHeight'] = coverHeight;
if (showTitle != null) map['showTitle'] = showTitle;
if (showUserName != null) map['showUserName'] = showUserName;
if (showPlayButton != null) map['showPlayButton'] = showPlayButton;
if (showDuration != null) map['showDuration'] = showDuration;
if (showViewCount != null) map['showViewCount'] = showViewCount;
if (showLikeCount != null) map['showLikeCount'] = showLikeCount;
if (showCommentCount != null) map['showCommentCount'] = showCommentCount;
if (showShareButton != null) map['showShareButton'] = showShareButton;
if (autoPlay != null) map['autoPlay'] = autoPlay;
if (loopPlay != null) map['loopPlay'] = loopPlay;
if (mutePlay != null) map['mutePlay'] = mutePlay;
if (preloadCount != null) map['preloadCount'] = preloadCount;
if (cacheSize != null) map['cacheSize'] = cacheSize;
if (networkType != null) map['networkType'] = networkType;
if (backgroundColor != null) map['backgroundColor'] = backgroundColor;
if (titleColor != null) map['titleColor'] = titleColor;
if (userNameColor != null) map['userNameColor'] = userNameColor;
if (playButtonColor != null) map['playButtonColor'] = playButtonColor;
if (statsColor != null) map['statsColor'] = statsColor;
if (borderColor != null) map['borderColor'] = borderColor;
if (borderWidth != null) map['borderWidth'] = borderWidth;
if (cornerRadius != null) map['cornerRadius'] = cornerRadius;
if (padding != null) map['padding'] = padding;
if (margin != null) map['margin'] = margin;
if (enableShadow != null) map['enableShadow'] = enableShadow;
if (shadowColor != null) map['shadowColor'] = shadowColor;
if (shadowOffsetX != null) map['shadowOffsetX'] = shadowOffsetX;
if (shadowOffsetY != null) map['shadowOffsetY'] = shadowOffsetY;
if (shadowBlurRadius != null) map['shadowBlurRadius'] = shadowBlurRadius;
if (fontSize != null) map['fontSize'] = fontSize;
if (fontBold != null) map['fontBold'] = fontBold;
if (titleMaxLines != null) map['titleMaxLines'] = titleMaxLines;
if (userNameMaxLength != null) map['userNameMaxLength'] = userNameMaxLength;
return map;
}