toMap method

Map<String, dynamic> toMap()

Implementation

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