TreeSelectionOptions<T> class

A SelectionOptions implementation that supports hierarchy.

TODO(google): add filtering and search options. TODO(google): improve the performance of the defaultComaprator. It is doing 2 * O(n log n) string conversions (which might be cheap if itemRenderer is just returning a string or expensive).

Inheritance
Mixed-in types

Constructors

TreeSelectionOptions()
TreeSelectionOptions.fromList(List<TreeSelectionOptionData<T>> listOfOptions, {ItemRenderer<T>? itemRenderer, Comparator<T>? comparator})

Properties

hashCode int
The hash code for this object.
no setterinherited
isNotEmpty bool
TODO(google): Remove method after b/26784290 is resolved.
no setterinherited
optionGroups List<OptionGroup<T>>
The groups of available options.
getter/setter pairinherited
optionsList List<T>
All options flattened in one list.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<List<OptionGroup<T>>>
Provides the stream of options group changes.
no setterinherited

Methods

allChildrenOf(T e) List<T>
Gets a flat list of T when given a parent of type T.
inherited
childrenOf(T? e, [Object? _]) DisposableFuture<List<OptionGroup<T>>>
Returns the children of the parent and filter the results based of the query if supported.
override
dispose() → void
Dispose when the the options come from a stream.
inherited
flatOptionGroup() List<OptionGroup<T>>
Flatten all the OptionGroups of the tree into one long list.
inherited
getHierarchyMap() Map<T, List<OptionGroup<T>>>
Returns the hierarchy map data of the tree.
override
getParent(T? child) → T?
Returns the parent of the given value
override
hasChildren(T? e) bool
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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