toJson method
Implementation
Map<String, Object?> toJson() {
return <String, Object?>{
'name': name,
if (description.isNotEmpty) 'description': description,
'screen': screen.toJson(),
'actions': actions
.map((action) => action.toJson())
.toList(growable: false),
};
}