SmoothCategory<T extends Comparable<T>> class abstract

The base class for data provided to the SmoothCategoryPicker.

Subclasses should override the getLabel accessor to give a human-readable version of this category for display in the UI.

Constructors

SmoothCategory(T value)
const

Properties

hasChildren → Future<bool>
Whether or not this node has children.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → T
The value of this node.
final

Methods

addChild(covariant SmoothCategory<T> newChild) → void
containsChildWithValue(T childValue) → Future<bool>
Returns true if this node has a child with the given value.
findInDescendants(T value) → Future<SmoothCategory<T>?>
getChild(T childValue) → Future<SmoothCategory<T>?>
Returns the child node with the value given.
getChildren() → Stream<SmoothCategory<T>>
Gets the list of children of this node.
getDescendants() → Stream<SmoothCategory<T>>
This returns a depth-first iterable over the descendants of this node.
getLabel(OpenFoodFactsLanguage language) → String
Returns a human-readable label that will be displayed in the UI
getParents() → Stream<SmoothCategory<T>>
Returns an iterable of the parents of this node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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