DropDownTextField constructor

const DropDownTextField({
  1. Key? key,
  2. dynamic controller,
  3. dynamic initialValue,
  4. required List<DropDownValueModel> dropDownList,
  5. EdgeInsets? padding,
  6. TextStyle? textStyle,
  7. ValueSetter? onChanged,
  8. FormFieldValidator<String>? validator,
  9. bool isEnabled = true,
  10. bool enableSearch = false,
  11. bool readOnly = true,
  12. double dropdownRadius = 12,
  13. InputDecoration? textFieldDecoration,
  14. IconProperty? dropDownIconProperty,
  15. int dropDownItemCount = 6,
  16. TextStyle? searchTextStyle,
  17. FocusNode? searchFocusNode,
  18. FocusNode? textFieldFocusNode,
  19. bool searchAutofocus = false,
  20. InputDecoration? searchDecoration,
  21. bool? searchShowCursor,
  22. TextInputType? searchKeyboardType,
  23. double listSpace = 0,
  24. bool clearOption = true,
  25. IconProperty? clearIconProperty,
  26. ListPadding? listPadding,
  27. TextStyle? listTextStyle,
  28. TextInputType? keyboardType,
  29. AutovalidateMode? autovalidateMode,
  30. BoxDecoration? boxDecoration,
  31. EdgeInsets? boxMargin,
})

Implementation

const DropDownTextField({
  super.key,
  this.controller,
  this.initialValue,
  required this.dropDownList,
  this.padding,
  this.textStyle,
  this.onChanged,
  this.validator,
  this.isEnabled = true,
  this.enableSearch = false,
  this.readOnly = true,
  this.dropdownRadius = 12,
  this.textFieldDecoration,
  this.dropDownIconProperty,
  this.dropDownItemCount = 6,
  this.searchTextStyle,
  this.searchFocusNode,
  this.textFieldFocusNode,
  this.searchAutofocus = false,
  this.searchDecoration,
  this.searchShowCursor,
  this.searchKeyboardType,
  this.listSpace = 0,
  this.clearOption = true,
  this.clearIconProperty,
  this.listPadding,
  this.listTextStyle,
  this.keyboardType,
  this.autovalidateMode,
  this.boxDecoration,
  this.boxMargin,
}) : assert(
       !(initialValue != null && controller != null),
       "you cannot add both initialValue and singleController,\nset initial value using controller \n\tEg: SingleValueDropDownController(data:initial value) ",
     ),
     assert(
       !(!readOnly && enableSearch),
       "readOnly!=true or enableSearch=true both condition does not work",
     ),
     assert(
       !(controller != null && controller is! SingleValueDropDownController),
       "controller must be type of SingleValueDropDownController",
     ),
     checkBoxProperty = null,
     isMultiSelection = false,
     singleController = controller,
     multiController = null,
     displayCompleteItem = false,
     submitButtonColor = null,
     submitButtonText = null,
     submitButtonTextStyle = null;