SmoothCategoryPicker<T extends Comparable<T>> class

A Picker for hierarchical categories or other hierarchical data.

This is a generic widget for displaying and picking categories out of a hierarchy. It allows adding of items, and editing of the selected categories.

It displays the list of categories at the top as deletable chips, and a breadcrumb display showing the path to the currently displayed category.

It is designed to allow random access to the categories by requesting information about a category "path" through the categoryFinder callback.

It can then notify of changes in the path through onPathChanged, the set of selected categories through onCategoriesChanged, and request a new category to be added.

Inheritance

Constructors

SmoothCategoryPicker({required CategoryPathSelector<T> categoryFinder, required List<T> currentPath, required CategoriesChangedCallback<T> onCategoriesChanged, required CategoryPathChangedCallback<T> onPathChanged, Set<T>? currentCategories, AddCategoryCallback<T>? onAddCategory, Key? key})

Properties

categoryFinder → CategoryPathSelector<T>
A callback used to collect information about the current category to be displayed.
final
currentCategories → Set<T>
The current set of selected categories.
final
currentPath → List<T>
The "path" to the currently displayed category.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAddCategory → AddCategoryCallback<T>?
A callback that is called whenever the user requests a new category via the floating action button in the chooser.
final
onCategoriesChanged → CategoriesChangedCallback<T>
A callback called when the categories list changes.
final
onPathChanged → CategoryPathChangedCallback<T>
A callback called when the selected path changes.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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