YaruChoiceChipBar class

A list of ChoiceChipBars wrapped either in a controllable ListView or Wrap.

Inheritance

Constructors

YaruChoiceChipBar({Key? key, required List<Widget> labels, void onSelected(int index)?, required List<bool> isSelected, YaruChoiceChipBarStyle yaruChoiceChipBarStyle = YaruChoiceChipBarStyle.row, double spacing = 10.0, Duration animationDuration = const Duration(milliseconds: 300), double navigationStep = 100.0, Curve animationCurve = Curves.bounceIn, double radius = kYaruTitleBarItemHeight, double chipHeight = kYaruTitleBarItemHeight, Axis wrapScrollDirection = Axis.horizontal, WrapAlignment wrapAlignment = WrapAlignment.start, WrapAlignment wrapRunAlignment = WrapAlignment.start, double wrapRunSpacing = 10.0, WrapCrossAlignment wrapCrossAlignment = WrapCrossAlignment.start, VerticalDirection wrapVerticalDirection = VerticalDirection.down, Clip wrapClipBehavior = Clip.none, TextDirection? wrapTextDirection, Widget? goPreviousIcon, Widget? goNextIcon, bool clearOnSelect = true, bool shrinkWrap = true, bool showCheckMarks = true, bool selectedFirst = true, Color? borderColor, Color? chipBackgroundColor, Color? selectedChipBackgroundColor, double? navigationButtonElevation})
const

Properties

animationCurve Curve
Sets the easing Curve of the animations.
final
animationDuration Duration
Sets how long the navigation jumps and fade in and out of the scrolling controls are animated.
final
borderColor Color?
The optional Color of the BorderSide of the ChoiceChips Defaults to Theme.of(context).chipTheme.shape?.side.color ?? Theme.of(context).colorScheme.outline
final
chipBackgroundColor Color?
The optional Color of the ShapeBorder of the ChoiceChips Defaults to Theme.of(context).chipTheme.backgroundColor
final
chipHeight double
Sets how high the whole bar is.
final
clearOnSelect bool
Flag to select if the scroll view should to back to the start on selection. Defaults to true.
final
goNextIcon Widget?
The Widget shown inside the right navigation button.
final
goPreviousIcon Widget?
The Widget shown inside the left navigation button.
final
hashCode int
The hash code for this object.
no setterinherited
isSelected List<bool>
The List of bool used to determine if the assigned ChoiceChip is selected. The length of isSelected must be equal to labels!
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labels List<Widget>
The List of Widget's used to generate a List of ChoiceChips in which they are placed. The length of labels mus be equal to isSelected!
final
The optional elevation of the navigation buttons. Defaults to 0.
final
Sets how far each scrolling step jumps in the ListView.
final
onSelected → void Function(int index)?
The Function called when a ChoiceChip with given index is selected. If onSelected is null, the whole YaruChoiceChipBar is disabled.
final
radius double
Sets how round the ChoiceChips and scrolling control buttons are.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedChipBackgroundColor Color?
The optional Color of the ShapeBorder of the ChoiceChips if selected. Defaults to Theme.of(context).chipTheme.selectedColor
final
selectedFirst bool
Defines if the selected ChoiceChips should be always placed first.
final
showCheckMarks bool
Defines if the ChoiceChips inside should show the checkmark. The default is true.
final
shrinkWrap bool
Forwards this to the internal ListView if YaruChoiceChipBarStyle.row or YaruChoiceChipBarStyle.wrap are used. The default is false
final
spacing double
The spacing of ChoiceChips inside the Wrap or the ListView
final
wrapAlignment WrapAlignment
The WrapAlignment of the ChoiceChips with YaruChoiceChipStyle.wrap.
final
wrapClipBehavior Clip
of the ChoiceChips with YaruChoiceChipStyle.wrap
final
wrapCrossAlignment WrapCrossAlignment
The WrapCrossAlignment of the ChoiceChips with YaruChoiceChipStyle.wrap
final
wrapRunAlignment WrapAlignment
The WrapAlignment of the ChoiceChips with with YaruChoiceChipStyle.wrap
final
wrapRunSpacing double
The spacing of the ChoiceChips when the Wrap places them in another row.
final
wrapScrollDirection Axis
The alignment of the ChoiceChips when the Wrap places them in another row.
final
wrapTextDirection TextDirection?
The TextDirection of the ChoiceChips with with YaruChoiceChipStyle.wrap
final
wrapVerticalDirection VerticalDirection
The VerticalDirection of the ChoiceChips with YaruChoiceChipStyle.wrap
final
yaruChoiceChipBarStyle YaruChoiceChipBarStyle
Determines weither the ChoiceChips should be put into a ListView or a Wrap or a ListView but with the scrolling controls put into a Stack on top of the ListView.
final

Methods

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