toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': 'enhanced_text',
'text': text,
'color': color.value,
'size': size,
'align': align.index,
'background': background.value,
'backgroundOpacity': backgroundOpacity,
'offset': {'dx': offset.dx, 'dy': offset.dy},
'rotation': rotation,
'fontFamily': fontFamily,
'animation': animation,
'animationDuration': animationDuration,
'fontWeight': fontWeight.index,
'isItalic': isItalic,
};
}