toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'posX': posX,
'posY': posY,
'dotWidth': dotWidth,
'barHeight': barHeight,
'readable': readable.toString().split('.').last, // Convert enum to string
'symbology': symbology.toString().split('.').last, // Convert enum to string
'align': align.toString().split('.').last, // Convert enum to string
'rotate': rotate.toString().split('.').last, // Convert enum to string
'width': width,
'height': height,
};
}