OptionSelectorControl<K, T> constructor

OptionSelectorControl<K, T>({
  1. Key? key,
  2. required KeyedOptionsHandler<K, T> handler,
  3. required FormValueChanged<KeyedOption<K, T>?> onChange,
  4. required ValueChanged<ValidationError> onError,
  5. required TypeaheadHandler<K, T> viewHandler,
  6. Widget? prefixIcon,
  7. ExpectedValue<K, T>? expected,
  8. T? initialValue,
  9. bool? showExpand,
  10. bool? enabled,
  11. Predicate? resultFilter,
  12. K? initialKeyValue,
  13. String? placeholder,
  14. String? noOptionsLabel,
  15. FocusNode? focusNode,
  16. TypeaheadFocusMode? focusMode,
  17. required bool? isRequired,
  18. bool autofocus = false,
  19. 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);