SmoothCategoryPicker<T extends Comparable<T> > class
Null safety
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.
Constructors
-
SmoothCategoryPicker({required CategoryPathSelector<
T> categoryFinder, Set<T> ? currentCategories, required List<T> currentPath, required CategoriesChangedCallback<T> onCategoriesChanged, required CategoryPathChangedCallback<T> onPathChanged, AddCategoryCallback<T> ? onAddCategory, dynamic 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. [...]
read-only, inherited
-
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.
read-only, inherited
Methods
-
createState(
) → dynamic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited