SearchableList<T>.sliver constructor
SearchableList<T>.sliver ({
- Key? key,
- required List<
T> initialList, - List<
T> filter(- String query
- required Widget itemBuilder(
- T item
- TextEditingController? searchTextController,
- TextInputAction keyboardAction = TextInputAction.done,
- InputDecoration? inputDecoration,
- TextStyle? textStyle,
- dynamic onSubmitSearch()?,
- SearchMode searchMode = SearchMode.onEdit,
- Widget? emptyWidget = const SizedBox.shrink(),
- TextInputType textInputType = TextInputType.text,
- bool obscureText = false,
- FocusNode? focusNode,
- bool searchFieldEnabled = true,
- double? searchFieldWidth,
- double? searchFieldHeight,
- bool displayClearIcon = true,
- Axis scrollDirection = Axis.vertical,
- SearchTextPosition searchTextPosition = SearchTextPosition.top,
- Future onPaginate()?,
- @Deprecated('Deprecated will be removed in the next release, use searchFieldPadding instead') double spaceBetweenSearchAndList = 20,
- EdgeInsetsGeometry? searchFieldPadding,
- Color? cursorColor,
- int? maxLines,
- int? maxLength,
- TextAlign textAlign = TextAlign.start,
- List<
String> autoCompleteHints = const [], - Widget? secondaryWidget,
- ScrollPhysics? physics,
- ScrollController? scrollController,
- bool closeKeyboardWhenScrolling = false,
- Widget? sortWidget,
- int sortPredicate(
- T a,
- T b
- bool displaySearchIcon = true,
- Color defaultSuffixIconColor = Colors.grey,
- double defaultSuffixIconSize = 24,
- bool lazyLoadingEnabled = true,
- void onChanged(
- bool? value
- 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);
}
}