SearchableDropdown constructor

const SearchableDropdown({
  1. required String hintText,
  2. required List<DropdownItem> items,
  3. required bool isLoading,
  4. Key? key,
  5. DropdownItem? selectedValue,
  6. void onSelectionChanged(
    1. DropdownItem item
    )?,
  7. void onSearch(
    1. String query
    )?,
  8. String? searchHint,
  9. String? noResultsText,
  10. String? loadingText,
  11. bool needInitialFetch = false,
  12. DropdownPlusTheme? dropdownTheme,
  13. DropdownPlusThemeStyle? themeStyle,
  14. Widget itemBuilder(
    1. DropdownItem item,
    2. bool isSelected
    )?,
  15. Widget selectedValueBuilder(
    1. DropdownItem selectedItem
    )?,
  16. Future<bool> checkInternetConnection()?,
  17. Duration debounceDuration = Duration.zero,
  18. bool enabled = true,
  19. bool autofocusSearch = false,
  20. DropdownEmptyBuilder? emptyBuilder,
  21. DropdownLoadingBuilder? loadingBuilder,
  22. Object? error,
  23. VoidCallback? onRetry,
  24. DropdownErrorBuilder? errorBuilder,
  25. String? semanticsLabel,
  26. int minSearchLength = 0,
  27. VoidCallback? onLoadMore,
  28. bool hasMore = false,
  29. bool isLoadingMore = false,
  30. FocusNode? focusNode,
  31. DropdownMenuController? menuController,
})

Implementation

const SearchableDropdown({
  required this.hintText,
  required this.items,
  required this.isLoading,
  super.key,
  this.selectedValue,
  this.onSelectionChanged,
  this.onSearch,
  this.searchHint,
  this.noResultsText,
  this.loadingText,
  this.needInitialFetch = false,
  this.dropdownTheme,
  this.themeStyle,
  this.itemBuilder,
  this.selectedValueBuilder,
  this.checkInternetConnection,
  this.debounceDuration = Duration.zero,
  this.enabled = true,
  this.autofocusSearch = false,
  this.emptyBuilder,
  this.loadingBuilder,
  this.error,
  this.onRetry,
  this.errorBuilder,
  this.semanticsLabel,
  this.minSearchLength = 0,
  this.onLoadMore,
  this.hasMore = false,
  this.isLoadingMore = false,
  this.focusNode,
  this.menuController,
});