LedgerGauge class

The hatched gauge (art.gauge), drawn on its 300 by 16 grid scaled to its width: a faint frame to the budget, the part spent hatched and edged in its ink to its mark, past the budget vermilion on its wash; the budget's tick across it; the month's pace as a green line on the paper. budgetAt places the budget along it (a category's stands at 250 of 300, room left for going over). Its paceLabel stands over the pace's line, its startLabel and endLabel under its ends, its budgetLabel under the budget. Spending past its end stops at its end, clipped to its box as the source's svg is. In right to left it runs from the right, its labels mirrored with it. Read as its label and the share spent.

LedgerGauge(ratio: 2486.12 / 2700, pace: 28 / 31, tick: false, paceLabel: 'Pace · day 28', startLabel: '\$0', endLabel: '\$2,700')
Inheritance

Constructors

LedgerGauge({required double ratio, double? pace, double budgetAt = 1, bool tick = true, LedgerGaugeTone tone = LedgerGaugeTone.ink, String? paceLabel, String? startLabel, String? endLabel, String? budgetLabel, String semanticLabel = 'Spent', Key? key})
A gauge filled to ratio, read as semanticLabel.
const

Properties

budgetAt → double
Where the budget stands along the gauge, a share of its width.
final
budgetLabel → String?
Words under the budget's tick.
final
endLabel → String?
Words under the gauge's end.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
pace → double?
The share of the month gone, its line on the gauge.
final
paceLabel → String?
Words over the pace's line (Today).
final
ratio → double
Spent over budget (or saved over target): 1 is the budget.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String
What a screen reader says the gauge is, before the share.
final
startLabel → String?
Words under the gauge's start.
final
tick → bool
Whether the budget's tick stands across the gauge.
final
tone → LedgerGaugeTone
How the part spent or saved is inked.
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.
override
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