toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
if (description != null) 'description': description,
'layout': layout.name,
'components': components.map((c) => c.toJson()).toList(),
'version': version,
};