FilterListWidget<T extends Object> class
The FilterListWidget is a widget with some filter utilities and callbacks which helps in single/multiple selection from list of data.
The listData should be list of dynamic data which needs to filter.
The selectedListData should be sub list of listData. The list passed to selectedListData should available in listData.
The choiceChipLabel is a callback which required String value in return. It used this value to display text on choice chip.
The validateSelectedItem used to identifies weather a item is selected or not.
onItemSearch filter the list on the basis of search field text. It expose search api to perform search operation according to requirement. When text change in search text field then return a list of element which contains specific text. if no element found then it should return empty list.
The choiceChipBuilder is a builder to design custom choice chip.
The onApplyButtonClick is a callback which return list of all selected items on apply button click. if no item is selected then it will return empty list.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FilterListWidget
Constructors
-
FilterListWidget({Key? key, FilterListThemeData? themeData, List<
T> ? listData, required ValidateSelectedItem<T> validateSelectedItem, ValidateRemoveItem<T> ? validateRemoveItem, required LabelDelegate<T> choiceChipLabel, required SearchPredict<T> onItemSearch, List<T> ? selectedListData, OnApplyButtonClick<T> ? onApplyButtonClick, ChoiceChipBuilder? choiceChipBuilder, Widget? headerCloseIcon, String? headlineText, bool hideSelectedTextCount = false, bool hideSearchField = false, bool hideCloseIcon = true, bool? hideHeader = false, Color? backgroundColor = Colors.white, bool enableOnlySingleSelection = false, String? allButtonText = 'All', String? applyButtonText = 'Apply', String? resetButtonText = 'Reset', String? selectedItemsText = 'selected items', List<ControlButtonType> controlButtons = const [ControlButtonType.All, ControlButtonType.Reset]}) -
const
Properties
- allButtonText → String?
-
All Button Label
final
- applyButtonText → String?
-
Apply Button Label
final
- backgroundColor → Color?
-
final
- choiceChipBuilder → ChoiceChipBuilder?
-
The
choiceChipBuilder
is a builder to design custom choice chip.final -
choiceChipLabel
→ LabelDelegate<
T> -
The
choiceChipLabel
is callback which required String value to display text on choice chip.final -
controlButtons
→ List<
ControlButtonType> -
control buttons to show on bottom of dialog along with 'Apply' button.
final
- enableOnlySingleSelection → bool
-
if enableOnlySingleSelection is true then it disabled the multiple selection.
and enabled the single selection model.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerCloseIcon → Widget?
-
Widget to close the dialog.
final
- headlineText → String?
-
final
- hideCloseIcon → bool
-
if true then it hides close icon.
final
- hideHeader → bool?
-
If true then it hide complete header section.
final
- hideSearchField → bool
-
final
- hideSelectedTextCount → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
listData
→ List<
T> ? -
Pass list containing all data which needs to filter
final
-
onApplyButtonClick
→ OnApplyButtonClick<
T> ? -
The
onApplyButtonClick
is a callback which return list of all selected items on apply button click. if no item is selected then it will return empty list.final -
onItemSearch
→ SearchPredict<
T> -
The
onItemSearch
is delegate which filter the list on the basis of search field text.final - resetButtonText → String?
-
Reset Button Label
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedItemsText → String?
-
Selected items count text
final
-
selectedListData
→ List<
T> ? -
The selectedListData is used to preselect the choice chips.
It takes list of object and this list should be subset og listData
final
- themeData → FilterListThemeData?
-
Filter theme
final
-
validateRemoveItem
→ ValidateRemoveItem<
T> ? -
The
validateRemoveItem
identifies if a item should be remove or not and returns the list filtered.final -
validateSelectedItem
→ ValidateSelectedItem<
T> -
The
validateSelectedItem
identifies weather a item is selected or not.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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}) → 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