CustomDropdown constructor

const CustomDropdown({
  1. required List<DropDownDataModel> items,
  2. required ValueChanged<DropDownDataModel> onChanged,
  3. ValueChanged<String>? onSearchChanged,
  4. Key? key,
  5. DropDownDataModel? selectedItem,
  6. String? searchHint = 'Search options',
  7. String? hint = 'Select an option',
  8. bool isSearch = false,
  9. bool isNetworkSearch = false,
  10. bool isNetworkSearchLoading = false,
  11. bool readOnly = false,
  12. bool disabled = false,
  13. bool isError = false,
  14. String? label,
  15. String? errorMessage,
  16. Color? filledColor,
  17. EdgeInsetsGeometry? menuPadding,
  18. bool isRequired = false,
  19. String? tooltipMessage,
  20. Widget? tooltipIcon,
  21. Color? tooltipIconColor,
})

Creates a CustomDropdown widget.

Implementation

const CustomDropdown({
  required this.items,
  required this.onChanged,
  this.onSearchChanged,
  super.key,
  this.selectedItem,
  this.searchHint = 'Search options',
  this.hint = 'Select an option',
  this.isSearch = false,
  this.isNetworkSearch = false,
  this.isNetworkSearchLoading = false,
  this.readOnly = false,
  this.disabled = false,
  this.isError = false,
  this.label,
  this.errorMessage,
  this.filledColor,
  this.menuPadding,
  this.isRequired = false,
  this.tooltipMessage,
  this.tooltipIcon,
  this.tooltipIconColor,
});