Dropdown constructor

const Dropdown({
  1. Key? key,
  2. Type dropdownType = Type.singleSelect,
  3. DropdownSubtype dropdownSubtype = DropdownSubtype.defaultSelect,
  4. TextEditingController? textEditingController,
  5. void onChange(
    1. String,
    2. String
    )?,
  6. List<DropdownItem> items = const [],
  7. List<DropdownItem> options = const [],
  8. IconData? textIcon,
  9. bool readOnly = false,
  10. IconData suffixIcon = Icons.arrow_drop_down,
  11. String emptyItemText = "No Options available",
  12. bool isSearchable = true,
  13. DropdownItem? selectedOption,
  14. bool isDisabled = false,
  15. List<ValueMapper>? valueMapper,
  16. String? errorMessage,
  17. String? helpText,
  18. SelectionType selectionType = SelectionType.multiSelect,
  19. List<DropdownItem> selectedOptions = const [],
  20. OnOptionSelect<int>? onOptionSelected,
  21. ChipConfig chipConfig = const ChipConfig(),
  22. FocusNode? focusNode,
  23. MultiSelectController<int>? controller,
  24. String clearAllText = 'Clear All',
  25. TreeSelectionType treeSelectionType = TreeSelectionType.singleSelect,
  26. List<TreeNode> treeOptions = const [],
  27. List<TreeNode> selectedTreeOptions = const [],
  28. OnOptionSelected<List<TreeNode>>? onTreeOptionSelected,
  29. Decoration? treeInputDecoration,
})

Implementation

const Dropdown({
  Key? key,
  this.dropdownType = Type.singleSelect,
  this.dropdownSubtype = DropdownSubtype.defaultSelect,
  this.textEditingController,
  this.onChange,
  this.items = const [],
  this.options = const [],
  this.textIcon,
  this.readOnly = false,
  this.suffixIcon = Icons.arrow_drop_down,
  this.emptyItemText = "No Options available",
  this.isSearchable = true,
  this.selectedOption,
  this.isDisabled = false,
  this.valueMapper,
  this.errorMessage,
  this.helpText,
  // MultiSelectDropDown props
  this.selectionType = SelectionType.multiSelect,
  this.selectedOptions = const [],
  this.onOptionSelected,
  this.chipConfig = const ChipConfig(),
  this.focusNode,
  this.controller,
  this.clearAllText = 'Clear All',
  // TreeSelectDropDown props
  this.treeSelectionType = TreeSelectionType.singleSelect,
  this.treeOptions = const [],
  this.selectedTreeOptions = const [],
  this.onTreeOptionSelected,
  this.treeInputDecoration,
}) : super(key: key);