toJson method

Object toJson()

Implementation

Object toJson () {
  return {
    'name': name,
    'description': description,
    'type': type.value,
    'required': required ?? false,
    'channel_types': channels?.map((channel) => channel.value).toList(),
    'choices': choices?.map((choice) => choice.toJson()).toList(),
    'min_value': min,
    'max_value': max,
  };
}