ComicTrack class

The trough: shape filled with fill and ringed by rim, holding cells in reading order.

The trough stands exactly a field's height. A cell gets the trough's whole height, the rim's bands above and below it included (the rim is drawn over the cells), so its press is the trough's full target and a 48 px touch target never makes the trough taller than the field beside it; what a cell draws stands the rim and gap in from the trough's outline, in cellShape (shape inset by the rim and gap). With lit set, the thumb, thumb-filled in cellShape, sits under that cell and slides when lit changes (a cut under Reduce Motion).

With equal every cell takes the widest one's width (or cellWidth where the row is unbounded), shrinking all alike where the row is narrower; without it each cell takes its own width and grow cells share what is left.

Inheritance

Constructors

ComicTrack({Key? key, required OutlinedBorder shape, required BorderSide rim, required Color fill, required List<Widget> cells, Color? thumb, int? lit, double gap = ComicTrack.inset, bool equal = true, bool stackWhenNarrow = false, double? cellWidth, Set<int> grow = const {}, double? minHeight})
Creates a trough.
const

Properties

cells → List<Widget>
The cells, in reading order.
final
cellWidth → double?
One cell's width where the row is unbounded; null takes the widest cell's.
final
equal → bool
Whether every cell takes one width.
final
fill → Color
The trough's fill.
final
gap → double
The room between the rim and a cell's face.
final
grow → Set<int>
Cells, by position, that take the width the others leave when equal is false.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lit → int?
The chosen cell, from zero; null draws no thumb.
final
minHeight → double?
The least outer height; null takes a field's.
final
rim → BorderSide
The trough's rim.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → OutlinedBorder
The trough's outline.
final
stackWhenNarrow → bool
Whether choices stack when their labels would otherwise shrink.
final
thumb → Color?
The thumb's fill.
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

cellShape(OutlinedBorder shape, BorderSide rim, [double gap = inset]) → OutlinedBorder
The outline a cell's face, wash and focus print take inside a trough of shape with rim.
fieldHeight(BuildContext context) → double
A field's height at context: the trough stands as tall as the fields beside it.

Constants

inset → const double
The gap between the thumb and the inside of the track rim.