toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['orientation'] = orientation;
data['imageUrl'] = imageUrl;
data['asset'] = asset;
data['gap'] = gap;
data['arrowImageWidth'] = arrowImageWidth;
data['arrowImageHeight'] = arrowImageHeight;
data['autoDimension'] = autoDimension;
data['arrowAutoDimensio'] = arrowAutoDimension;
data['text'] = text;
data['fontColor'] = fontColor;
data['fontSize'] = fontSize;
data['fontWeight'] = fontWeight;
data['lineHeight'] = lineHeight;
data['alignment'] = alignment;
if (margin != null) {
data['margin'] = margin!.toJson();
}
if (padding != null) {
data['padding'] = padding!.toJson();
}
data['autoLink'] = autoLink;
data['elevation'] = elevation;
data['hasBg'] = hasBg;
data['bgUrl'] = bgUrl;
data['bgColor'] = bgColor;
data['bgOpacity'] = bgOpacity;
data['bgObjectFit'] = bgObjectFit;
data['bgWidth'] = bgWidth;
data['bgHeight'] = bgHeight;
data['bgTop'] = bgTop;
data['bgLeft'] = bgLeft;
data['hasBorder'] = hasBorder;
data['borderColor'] = borderColor;
data['borderOpacity'] = borderOpacity;
data['roundness'] = roundness;
if (border != null) {
data['border'] = border!.toJson();
}
data['hasAction'] = hasAction;
data['clickType'] = clickType;
data['target'] = target;
data['hasTransition'] = hasTransition;
data['transition'] = transition;
data['height'] = height;
data['width'] = width;
data['style'] = style;
data['horiAlignment'] = horizontalAlignment;
data['verAlignment'] = verticalAlignment;
if (children != null) {
data['children'] = children!.map((v) => v.toJson()).toList();
}
data['horiContentAlignment'] = horizontalContentAlignment;
data['verContentAlignment'] = verticalContentAlignment;
data['size'] = size;
data['color'] = color;
data['endDate'] = endDate?.toIso8601String();
data['arrowImageUrl'] = arrowImageUrl;
data['arrowColor'] = arrowColor;
data['hasLines'] = hasLines;
data['lineColor'] = lineColor;
data['lineGap'] = lineGap;
data['lineStyle'] = lineStyle;
data['lineThickness'] = lineThickness;
data['constHeight'] = constHeight;
data['constWidth'] = constWidth;
data['currentCount'] = currentCount;
data['maxCount'] = maxCount;
data['imageHeight'] = imageHeight;
data['imageWidth'] = imageWidth;
data['barColor'] = barColor;
data['barBgColor'] = barBgColor;
data['showToast'] = showToast;
data['toastMessage'] = toastMessage;
data['copyText'] = copyText;
data['shareText'] = shareText;
return data;
}