SelectedFilters class

It creates a selectable filter UI view displaying the current selected values from other active widgets.

This component is useful for improving selection accessibility of other components.

Examples Use(s):

  • displaying all the user selected facet filters together in the main view area for better accessibility.
Inheritance

Constructors

SelectedFilters({List<String>? subscribeTo, String filterLabel(String id, String value)?, bool? showClearAll = true, String? clearAllLabel, void onClearAll()?, void onClear(String, dynamic)?, bool? resetToDefault, Map<String, dynamic>? defaultValues, bool? hideDefaultValues, Widget buildFilters(BuildOptions options)?, Key? key})

Properties

buildFilters → (Widget Function(BuildOptions options)?)
It is used for custom rendering the filters For example,
final
clearAllLabel String?
To modify the clear all label. For example,
final
defaultValues Map<String, dynamic>?
A map of active widgets' default values. For example,
final
filterLabel → (String Function(String id, String value)?)
An optional prop to define the filter labels for each controller. The default value of filter is the $id: $value. For example,
final
hashCode int
The hash code for this object.
no setterinherited
hideDefaultValues bool?
If true then SelectedFilters will not show default values of active widgets. For example,
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onClear → (void Function(String, dynamic)?)
Callback function, triggered when a specific filter is cleared. For example,
final
onClearAll → (void Function()?)
Callback function, triggered when all filters are cleared. For example,
final
resetToDefault bool?
If true then Clear All action would reset the filter values to default values. User must define the defaultValues prop when resetToDefault is true. For example,
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showClearAll bool?
If true then display Clear All button. Defaults to true. For example,
final
subscribeTo List<String>?
A list of component ids to subscribe to.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SelectedFiltersState
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}) 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