ChoiceList<T> class

Inheritance
Implementers

Constructors

ChoiceList({Key? key, required int itemCount, required IndexedChoiceStateBuilder<T> itemBuilder, ChoiceSkipResolver<T>? itemSkip, ChoiceGroupResolver? itemGroup, ChoiceStateBuilder<T>? dividerBuilder, ChoiceStateBuilder<T>? leadingBuilder, ChoiceStateBuilder<T>? trailingBuilder, ChoiceStateBuilder<T>? placeholderBuilder, ChoiceStateBuilder<T>? errorBuilder, ChoiceStateBuilder<T>? loaderBuilder, ChoiceGroupSortResolver? groupSort, ChoiceGroupBuilder? groupBuilder, ChoiceGroupItemBuilder? groupItemBuilder, ChoiceGroupHeaderBuilder<T>? groupHeaderBuilder, ChoiceListBuilder? builder, bool loading = false, bool error = false})
const

Properties

builder ChoiceListBuilder?
Called to build the list of choice items
final
dividerBuilder ChoiceStateBuilder<T>?
Called to build divider item
final
effectiveErrorBuilder ChoiceStateBuilder<T>
no setter
effectiveGroupBuilder ChoiceGroupBuilder
no setter
effectiveGroupHeaderBuilder ChoiceGroupHeaderBuilder<T>
no setter
effectiveGroupItemBuilder ChoiceGroupItemBuilder
no setter
effectiveItemSkip ChoiceSkipResolver<T>
no setter
effectiveListBuilder ChoiceListBuilder
no setter
effectiveLoadingBuilder ChoiceStateBuilder<T>
no setter
effectivePlaceholderBuilder ChoiceStateBuilder<T>
no setter
error bool
Specifies whether the choice list has error
final
errorBuilder ChoiceStateBuilder<T>?
Called to build an error indicator widget when choice list cannot be shown
final
groupBuilder ChoiceGroupBuilder?
Called to build the grouped list of choice items
final
groupHeaderBuilder ChoiceGroupHeaderBuilder<T>?
Called to build the grouped header of choice items
final
groupItemBuilder ChoiceGroupItemBuilder?
Called to build the grouped item of choice items
final
groupSort ChoiceGroupSortResolver?
If provided, sort group by the given callback
final
hasDivider bool
Indicates whether the choice list has divider item
no setter
hashCode int
The hash code for this object.
no setterinherited
hasLeading bool
Indicates whether the choice list has leading item
no setter
hasTrailing bool
Indicates whether the choice list has trailing item
no setter
isGrouped bool
Indicates whether the choice items is grouped
no setter
itemBuilder IndexedChoiceStateBuilder<T>
Called to build choice item
final
itemCount int
The total number of item, this choice list can provide
final
itemGroup ChoiceGroupResolver?
Called to enable grouped choices and specify group name of choice item
final
itemSkip ChoiceSkipResolver<T>?
Called to specify which indices to skip when building choice item
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingBuilder ChoiceStateBuilder<T>?
Called to build leading item of the item collection
final
loaderBuilder ChoiceStateBuilder<T>?
Called to build loading indicator when loading is true
final
loading bool
Specify whether the choice items is in loading state
final
placeholderBuilder ChoiceStateBuilder<T>?
Called to build placeholder when there are no choice items
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trailingBuilder ChoiceStateBuilder<T>?
Called to build trailing item of the item collection
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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

Static Methods

createGrid({bool shrinkWrap = true, ScrollPhysics? physics, SliverGridDelegate? delegate, Axis direction = Axis.vertical, EdgeInsetsGeometry padding = EdgeInsets.zero, double spacing = 0.0, int columns = 2, double childAspectRatio = 1.0}) ChoiceListBuilder
createScrollable({Axis direction = Axis.horizontal, double spacing = 0.0, double runSpacing = 0.0, EdgeInsetsGeometry padding = EdgeInsets.zero, WrapAlignment alignment = WrapAlignment.start, WrapAlignment runAlignment = WrapAlignment.start, WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start, TextDirection? textDirection, VerticalDirection verticalDirection = VerticalDirection.down, Clip clipBehavior = Clip.none}) ChoiceListBuilder
createVirtualized({bool shrinkWrap = false, ScrollPhysics? physics, Axis direction = Axis.vertical, EdgeInsetsGeometry? padding}) ChoiceListBuilder
createWrapped({Axis direction = Axis.horizontal, WrapAlignment alignment = WrapAlignment.start, EdgeInsetsGeometry padding = EdgeInsets.zero, double spacing = 10.0, WrapAlignment runAlignment = WrapAlignment.start, double runSpacing = 10.0, WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start, TextDirection? textDirection, VerticalDirection verticalDirection = VerticalDirection.down, Clip clipBehavior = Clip.none}) ChoiceListBuilder
defaultItemSkip<T>(ChoiceController<T> state, int i) bool