toJson method

  1. @override
Map<String, dynamic> toJson()
override

Serialises this node and all its children into the SDUI JSON format.

Implementation

@override
Map<String, dynamic> toJson() => {
  'widget': 'Stack',
  'properties': {if (alignment != null) 'alignment': alignment},
  'children': children.map((c) => c.toJson()).toList(),
};