toJson method
Converts the row and its layout properties to a JSON map.
Useful for serializing Flint UI widgets into APIs or visual editors.
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': 'row',
'children': children.map((child) => child.toJson()).toList(),
'columnWidths': columnWidths,
'gap': gap,
'padding': padding?.toJson(),
'margin': margin?.toJson(),
'backgroundColor': backgroundColor,
'border': border?.toJson(),
'borderRadius': borderRadius?.toJson(),
'alignment': alignment,
};
}