toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
'name': name,
'description': description,
'type': type.value,
'required': isRequired,
'choices':
choices.map((e) => {'name': e.name, 'value': e.value}).toList(),
};
}