OptionSelectorControl<K, T> constructor
OptionSelectorControl<K, T> ({
- Key? key,
- required KeyedOptionsHandler<
K, T> handler, - required FormValueChanged<
KeyedOption< onChange,K, T> ?> - required ValueChanged<
ValidationError> onError, - required TypeaheadHandler<
K, T> viewHandler, - Widget? prefixIcon,
- ExpectedValue<
K, T> ? expected, - T? initialValue,
- bool? showExpand,
- bool? enabled,
- Predicate? resultFilter,
- K? initialKeyValue,
- String? placeholder,
- String? noOptionsLabel,
- FocusNode? focusNode,
- TypeaheadFocusMode? focusMode,
- required bool? isRequired,
- bool autofocus = false,
- TextEditingController? textController,
Implementation
OptionSelectorControl({
Key? key,
required this.handler,
required this.onChange,
required this.onError,
required this.viewHandler,
Widget? prefixIcon,
ExpectedValue<K, T>? expected,
this.initialValue,
bool? showExpand,
this.enabled,
this.resultFilter,
this.initialKeyValue,
String? placeholder,
String? noOptionsLabel,
this.focusNode,
TypeaheadFocusMode? focusMode,
required this.isRequired,
this.autofocus = false,
this.textController,
}) : placeholder = placeholder ?? viewHandler.options?.placeholder,
expected = expected ?? ((input) => input),
noOptionsLabel = noOptionsLabel ?? viewHandler.options?.noOptionsLabel,
focusMode = focusMode ?? viewHandler.options?.focusMode,
showExpand = showExpand ??
viewHandler.options?.showExpand ??
(focusMode ?? viewHandler.options?.focusMode).isShowAll,
prefixIcon = prefixIcon ?? viewHandler.options?.prefixIcon as Widget?,
super(key: key);