SearchableList<T> class

Inheritance

Constructors

SearchableList.new({Key? key, required List<T> initialList, required Widget itemBuilder(T item)?, List<T> filter(String query)?, Widget? loadingWidget, Widget? errorWidget, TextEditingController? searchTextController, TextInputAction keyboardAction = TextInputAction.done, InputDecoration? inputDecoration, TextStyle? textStyle, dynamic onSubmitSearch(String?)?, SearchMode searchMode = SearchMode.onEdit, Widget? emptyWidget, TextInputType textInputType = TextInputType.text, bool obscureText = false, FocusNode? focusNode, bool searchFieldEnabled = true, double? searchFieldWidth, double? searchFieldHeight, bool displayClearIcon = true, Future<void> onRefresh()?, 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, bool shrinkWrap = false, double? itemExtent, EdgeInsetsGeometry? listViewPadding, bool reverse = false, int sortPredicate(T a, T b)?, Widget? sortWidget, Widget seperatorBuilder(BuildContext context, int index)?, ScrollController? scrollController, bool closeKeyboardWhenScrolling = false, bool displaySearchIcon = true, Color defaultSuffixIconColor = Colors.grey, double defaultSuffixIconSize = 24, bool lazyLoadingEnabled = true, void onChanged(bool? value)?, required List<T> selectedList})
SearchableList.async({Key? key, required Future<List<T>?> asyncListCallback()?, required List<T> asyncListFilter(String, List<T>)?, required Widget itemBuilder(T item)?, Widget? loadingWidget, Widget? errorWidget, TextEditingController? searchTextController, TextInputAction keyboardAction = TextInputAction.done, InputDecoration? inputDecoration, TextStyle? textStyle, dynamic onSubmitSearch(String?)?, 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, Future<void> onRefresh()?, 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, bool shrinkWrap = false, double? itemExtent, EdgeInsetsGeometry? listViewPadding, bool reverse = false, Widget seperatorBuilder(BuildContext context, int index)?, int sortPredicate(T a, T b)?, Widget? sortWidget, ScrollController? scrollController, bool closeKeyboardWhenScrolling = false, bool displaySearchIcon = true, Color defaultSuffixIconColor = Colors.grey, double defaultSuffixIconSize = 24, bool lazyLoadingEnabled = true, void onChanged(bool? value)?, required List<T> selectedList})
SearchableList.expansion({Key? key, required Map<dynamic, List<T>> expansionListData, required Widget expansionTitleBuilder(dynamic), required Map<dynamic, List<T>> filterExpansionData(String)?, required Widget expansionListBuilder(int expansionGroupIndex, T listItem)?, TextEditingController? searchTextController, TextInputAction keyboardAction = TextInputAction.done, InputDecoration? inputDecoration, TextStyle? textStyle, dynamic onSubmitSearch(String?)?, 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, @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, bool shrinkWrap = false, double? itemExtent, EdgeInsetsGeometry? listViewPadding, bool reverse = false, ScrollController? scrollController, bool closeKeyboardWhenScrolling = false, bool hideEmptyExpansionItems = false, bool expansionTileEnabled = true, 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})
SearchableList.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(String?)?, 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})

Properties

asyncListCallback Future<List<T>?> Function()?
getter/setter pair
asyncListFilter List<T> Function(String, List<T>)?
getter/setter pair
autoCompleteHints List<String>
final
closeKeyboardWhenScrolling bool
final
cursorColor Color?
final
defaultSuffixIconColor Color
final
defaultSuffixIconSize double
final
displayClearIcon bool
final
displayDivider bool
Indicate if the divider will be displayed or not if true the listview will be rendered with ListView.separated constructor
getter/setter pair
displaySearchIcon bool
final
emptyWidget Widget?
final
errorWidget Widget?
getter/setter pair
expansionListBuilder Widget Function(int expansionGroupIndex, T listItem)?
getter/setter pair
expansionListData Map<dynamic, List<T>>
getter/setter pair
expansionTileEnabled bool
getter/setter pair
expansionTitleBuilder Widget Function(dynamic)
getter/setter pair
filter List<T> Function(String query)?
getter/setter pair
filterExpansionData Map<dynamic, List<T>> Function(String)?
getter/setter pair
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
hideEmptyExpansionItems bool
getter/setter pair
initialList List<T>
getter/setter pair
inputDecoration InputDecoration?
final
isExpansionList bool
getter/setter pair
itemBuilder Widget Function(T item)?
getter/setter pair
itemExtent double?
getter/setter pair
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAction TextInputAction
final
lazyLoadingEnabled bool
final
listViewPadding EdgeInsetsGeometry?
getter/setter pair
loadingWidget Widget?
getter/setter pair
maxLength int?
final
maxLines int?
final
obscureText bool
final
onChanged → void Function(bool? value)?
final
onPaginate Future Function()?
getter/setter pair
onRefresh Future<void> Function()?
getter/setter pair
onSubmitSearch → dynamic Function(String?)?
final
physics ScrollPhysics?
getter/setter pair
reverse bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
getter/setter pair
scrollDirection Axis
getter/setter pair
searchFieldEnabled bool
final
searchFieldHeight double?
final
searchFieldPadding EdgeInsetsGeometry?
final
searchFieldWidth double?
final
searchMode → SearchMode
final
searchTextController TextEditingController?
getter/setter pair
searchTextPosition ↔ SearchTextPosition
getter/setter pair
secondaryWidget Widget?
final
selectedList List<T>
final
seperatorBuilder Widget Function(BuildContext context, int index)?
getter/setter pair
shrinkWrap bool
getter/setter pair
sliverScrollEffect bool
Indicates whether the ssliver scroll effect will be applied on the listview and search field or not by default sliverScrollEffect == false
getter/setter pair
sortPredicate int Function(T a, T b)?
getter/setter pair
sortWidget Widget?
getter/setter pair
spaceBetweenSearchAndList double
final
textAlign TextAlign
final
textInputType TextInputType
final
textStyle TextStyle?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SearchableList>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited