SearchableDropdownPlus<C extends BlocBase<S>, S> constructor

const SearchableDropdownPlus<C extends BlocBase<S>, S>({
  1. required C cubit,
  2. required void onSearch(
    1. String query
    ),
  3. required void onStateChange(
    1. S state,
    2. void updateList(
      1. List<DropdownItem>
      ),
    3. void updateLoading(
      1. bool
      )
    ),
  4. required String hintText,
  5. Key? key,
  6. DropdownItem? selectedValue,
  7. void onSelectionChanged(
    1. DropdownItem item
    )?,
  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 SearchableDropdownPlus({
  required this.cubit,
  required this.onSearch,
  required this.onStateChange,
  required this.hintText,
  super.key,
  this.selectedValue,
  this.onSelectionChanged,
  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,
});