toJson method
Serialises this node and all its children into the SDUI JSON format.
Implementation
@override
Map<String, dynamic> toJson() => {
'widget': 'Padding',
'properties': {'padding': padding},
if (child != null) 'child': child!.toJson(),
};