SelectWrapView class

A wrap chip group for selecting among sibling SelectEntry entries.

Renders all SelectEntry subtypes as chips laid out by a Wrap, so the group flows onto as many rows as needed and the view's height grows to fit. This is the canonical render target for SelectWrapLayout.

A custom range entry (a SelectRangeEntry with the special id custom, see SelectRangeEntryExt.isCustom) placed first or last in entries is not rendered as a chip. Instead it is rendered as a min/max input field above or below the chip group, mirroring SelectGridView. The committed value is reported through onChanged once both fields lose focus.

Inheritance

Constructors

SelectWrapView({Key? key, SelectEntry? category, required List<SelectEntry> entries, SelectEntries? selectedEntries, bool showTitle = true, double spacing = 0.0, double runSpacing = 0.0, Color? backgroundColor, EdgeInsetsGeometry? padding, SelectChipVariant? variant, SelectFieldTileVariant? fieldVariant, SelectItemBuilder? itemBuilder, Color? chipColor, Color? selectedChipColor, TextStyle? labelStyle, TextStyle? selectedLabelStyle, String toText = '-', required OnChanged<SelectEntry> onChanged})
const

Properties

backgroundColor Color?
The color of the group's background.
final
category SelectEntry?
The parent SelectEntry whose SelectEntry.name is displayed as the group's title when showTitle is true.
final
chipColor Color?
The color of an unselected chip.
final
entries List<SelectEntry>
The sibling entries to display as chips.
final
fieldVariant SelectFieldTileVariant?
The visual variant of the custom range input field, if entries contains a custom range entry.
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder SelectItemBuilder?
Optional builder that fully replaces each chip's widget.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle TextStyle?
The text style for an unselected chip's label.
final
onChanged OnChanged<SelectEntry>
Called when the user taps a chip or commits the custom range input.
final
padding EdgeInsetsGeometry?
The padding around the group's contents.
final
runSpacing double
Vertical spacing between wrapped chip rows; the Wrap.runSpacing.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedChipColor Color?
The color of a selected chip.
final
selectedEntries SelectEntries?
The set of currently selected entries.
final
selectedLabelStyle TextStyle?
The text style for a selected chip's label.
final
showTitle bool
Whether to show the category title.
final
spacing double
Horizontal spacing between chips in a row; the Wrap.spacing.
final
toText String
Text rendered between the two custom range input fields.
final
variant SelectChipVariant?
The visual style of the chips.
final

Methods

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