BasicInputDropdown<T> constructor

const BasicInputDropdown<T>({
  1. Key? key,
  2. String? name,
  3. bool haveSearch = false,
  4. List<BasicInputDropdownItemModel<T>> filterOption(
    1. String,
    2. List<BasicInputDropdownItemModel<T>>
    )?,
  5. required List<BasicInputDropdownItemModel<T>> menuChildren,
  6. dynamic onSelected(
    1. BasicInputDropdownItemModel<T>
    )?,
  7. Offset? offset,
  8. double? maxHeightPopup,
  9. double? minHeightPopup,
  10. double? maxWidthPopup,
  11. double? minWidthPopup,
  12. BasicInputSize? size,
  13. double? width,
  14. BasicInputDropdownItemModel<T>? initialValue,
  15. TextEditingController? controller,
  16. FocusNode? focusNode,
  17. dynamic onFocusChange(
    1. bool
    )?,
  18. TextAlign textAlign = TextAlign.start,
  19. TextAlignVertical? textAlignVertical,
  20. TextInputAction? textInputAction,
  21. TextInputType? keyboardType,
  22. int maxLines = 1,
  23. int? minLines,
  24. int? maxLength,
  25. bool enabled = true,
  26. bool obscureText = false,
  27. EdgeInsets? scrollPadding,
  28. Color? cursorColor,
  29. AutovalidateMode? autoValidateMode,
  30. FormFieldValidator<String>? validator,
  31. List<TextInputFormatter>? inputFormatters,
  32. ValueTransformer<BasicInputDropdownItemModel<T>?>? valueTransformer,
  33. ValueChanged<String?>? onChanged,
  34. GestureTapCallback? onTap,
  35. VoidCallback? onEditingComplete,
  36. FormFieldSetter? onSaved,
  37. bool? isDense,
  38. bool? filled,
  39. Widget? prefixIcon,
  40. EdgeInsets? contentPadding,
  41. InputBorder? focusedBorder,
  42. InputBorder? enabledBorder,
  43. InputBorder? disabledBorder,
  44. InputBorder? errorBorder,
  45. InputBorder? focusedErrorBorder,
  46. Color? fillColor,
  47. Color? hoverColor,
  48. String? labelText,
  49. TextStyle? labelStyle,
  50. TextStyle? floatingLabelStyle,
  51. FloatingLabelBehavior? floatingLabelBehavior,
  52. String? hintText,
  53. TextStyle? hintStyle,
  54. String? errorText,
  55. int? errorMaxLines,
  56. TextStyle? errorStyle,
})

Implementation

const BasicInputDropdown({
  Key? key,
  this.name,
  this.haveSearch = false,
  this.filterOption,
  required this.menuChildren,
  this.onSelected,
  this.offset,
  this.maxHeightPopup,
  this.minHeightPopup,
  this.maxWidthPopup,
  this.minWidthPopup,
  this.size,
  this.width,
  this.initialValue,
  this.controller,
  this.focusNode,
  this.onFocusChange,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textInputAction,
  this.keyboardType,
  this.maxLines = 1,
  this.minLines,
  this.maxLength,
  this.enabled = true,
  this.obscureText = false,
  this.scrollPadding,
  this.cursorColor,
  this.autoValidateMode,
  this.validator,
  this.inputFormatters,
  this.valueTransformer,
  this.onChanged,
  this.onTap,
  this.onEditingComplete,
  this.onSaved,
  this.isDense,
  this.filled,
  this.prefixIcon,
  this.contentPadding,
  this.focusedBorder,
  this.enabledBorder,
  this.disabledBorder,
  this.errorBorder,
  this.focusedErrorBorder,
  this.fillColor,
  this.hoverColor,
  this.labelText,
  this.labelStyle,
  this.floatingLabelStyle,
  this.floatingLabelBehavior,
  this.hintText,
  this.hintStyle,
  this.errorText,
  this.errorMaxLines,
  this.errorStyle,
})  : assert(
        !(haveSearch == true && filterOption == null),
        'If haveSearch is true, filterOption must not be null',
      ),
      super(key: key);