SearchableList<T>.sliver constructor

SearchableList<T>.sliver({
  1. Key? key,
  2. required List<T> initialList,
  3. List<T> filter(
    1. String query
    )?,
  4. required Widget itemBuilder(
    1. T item
    )?,
  5. TextEditingController? searchTextController,
  6. TextInputAction keyboardAction = TextInputAction.done,
  7. InputDecoration? inputDecoration,
  8. TextStyle? textStyle,
  9. dynamic onSubmitSearch(
    1. String?
    )?,
  10. SearchMode searchMode = SearchMode.onEdit,
  11. Widget? emptyWidget = const SizedBox.shrink(),
  12. TextInputType textInputType = TextInputType.text,
  13. bool obscureText = false,
  14. FocusNode? focusNode,
  15. bool searchFieldEnabled = true,
  16. double? searchFieldWidth,
  17. double? searchFieldHeight,
  18. bool displayClearIcon = true,
  19. Axis scrollDirection = Axis.vertical,
  20. SearchTextPosition searchTextPosition = SearchTextPosition.top,
  21. Future onPaginate()?,
  22. @Deprecated('Deprecated will be removed in the next release, use searchFieldPadding instead') double spaceBetweenSearchAndList = 20,
  23. EdgeInsetsGeometry? searchFieldPadding,
  24. Color? cursorColor,
  25. int? maxLines,
  26. int? maxLength,
  27. TextAlign textAlign = TextAlign.start,
  28. List<String> autoCompleteHints = const [],
  29. Widget? secondaryWidget,
  30. ScrollPhysics? physics,
  31. ScrollController? scrollController,
  32. bool closeKeyboardWhenScrolling = false,
  33. Widget? sortWidget,
  34. int sortPredicate(
    1. T a,
    2. T b
    )?,
  35. bool displaySearchIcon = true,
  36. Color defaultSuffixIconColor = Colors.grey,
  37. double defaultSuffixIconSize = 24,
  38. bool lazyLoadingEnabled = true,
  39. void onChanged(
    1. bool? value
    )?,
  40. required List<T> selectedList,
})

Implementation

SearchableList.sliver({
  Key? key,
  required this.initialList,
  this.filter,
  required this.itemBuilder,
  this.searchTextController,
  this.keyboardAction = TextInputAction.done,
  this.inputDecoration,
  this.textStyle,
  this.onSubmitSearch,
  this.searchMode = SearchMode.onEdit,
  this.emptyWidget = const SizedBox.shrink(),
  this.textInputType = TextInputType.text,
  this.obscureText = false,
  this.focusNode,
  this.searchFieldEnabled = true,
  this.searchFieldWidth,
  this.searchFieldHeight,
  this.displayClearIcon = true,
  this.scrollDirection = Axis.vertical,
  this.searchTextPosition = SearchTextPosition.top,
  this.onPaginate,
  @Deprecated(
    'Deprecated will be removed in the next release, use searchFieldPadding instead',
  )
  this.spaceBetweenSearchAndList = 20,
  this.searchFieldPadding,
  this.cursorColor,
  this.maxLines,
  this.maxLength,
  this.textAlign = TextAlign.start,
  this.autoCompleteHints = const [],
  this.secondaryWidget,
  this.physics,
  this.scrollController,
  this.closeKeyboardWhenScrolling = false,
  this.sortWidget,
  this.sortPredicate,
  this.displaySearchIcon = true,
  this.defaultSuffixIconColor = Colors.grey,
  this.defaultSuffixIconSize = 24,
  this.lazyLoadingEnabled = true,
  // this.isSelectALL,
  this.onChanged,
  required this.selectedList,
}) : super(key: key) {
  asyncListCallback = null;
  asyncListFilter = null;
  searchTextController ??= TextEditingController();
  seperatorBuilder = null;
  sliverScrollEffect = true;
  onRefresh = null;
  shrinkWrap = false;
  itemExtent = null;
  listViewPadding = null;
  this.reverse = false;
  expansionListBuilder = null;
  if (sortWidget != null) {
    assert(sortPredicate != null);
  }
}