FixedListInputConfig constructor
FixedListInputConfig({})
Implementation
FixedListInputConfig({
required super.id,
required super.label,
super.defaultValue,
super.required,
super.conditions,
required this.options,
this.defaultOption,
}) : super(type: InputType.fixedList) {
bool defaultExists = defaultOption == null;
maxLength = options.fold<int>(
0,
(max, o) {
defaultExists = defaultExists || o == defaultOption;
return o.length > max ? o.length : max;
},
);
assert(defaultExists, 'defaultOption not in options');
}