fromJson method

  1. @override
InputConfig fromJson(
  1. Map<String, dynamic> json
)

Implementation

@override
InputConfig fromJson(Map<String, dynamic> json) {
  final type = json['type'];
  switch (type) {
    case 'text':
      return TextInputConfig.fromJson(json);
    case 'editableList':
      return EditableListInputConfig.fromJson(json);
    case 'fixedList':
      return FixedListInputConfig.fromJson(json);
    default:
      throw ArgumentError('Unknown InputType: $type');
  }
}