toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'style': style.toString().split('.').last, // Convert enum to string
    'width': width,
    'height': height,
    'posX': posX,
    'posY': posY,
    'endX': endX,
    'endY': endY,
    'thick': thick,
  };
}