Map<String, dynamic> toMap() { return { 'type': type, 'x1': x1, 'y1': y1, 'x2': x2, 'y2': y2, 'color': color, 'thickness': thickness, 'lineType': lineType, ..._extraProperties, }; }