toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'posX': posX,
'posY': posY,
'textSize': textSize,
'textWidthRatio': textWidthRatio,
'textHeightRatio': textHeightRatio,
'width': width,
'height': height,
'align': align.toString().split('.').last, // Convert enum to string
'rotate': rotate.toString().split('.').last, // Convert enum to string
'textSpace': textSpace,
'enableBold': enableBold,
'enableUnderline': enableUnderline,
'enableStrikethrough': enableStrikethrough,
'enableItalics': enableItalics,
'enAntiColor': enAntiColor,
};
}