toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  if (type == DropdownSourceTypes.static) {
    return (this as StaticDropdownSource).toJson();
  } else if (type == DropdownSourceTypes.dynamic) {
    return (this as DynamicDropdownSource).toJson();
  }
  throw Exception('Unknown dropdown source type');
}