Gauge
A single-value status indicator: a horizontal bar with an optional
inline label and a percentage suffix. Sub-cell precision via the
horizontal eighth-block glyphs (▏▎▍▌▋▊▉█).
See also: ProgressBar for a plain progress bar.
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
Gauge(value: 0.62, label: 'CPU')Gauge( value: 0.94, label: 'CPU', // The fill turns amber past 0.7, red past 0.9. thresholds: <(double, Color)>[ (0.7, theme.colorScheme.warning), (0.9, theme.colorScheme.error), ],)Gauge(value: 0.5, label: 'Disk', showPercentage: false)Details
Section titled “Details”Distinct from ProgressBar by intent — Gauge is for status reading
(CPU, memory, disk, signal), with a labeled, prominent presentation;
ProgressBar is for task progress. Use ProgressBar when something
is happening; use Gauge when something is.
Screen readers and agents get one chart node: semanticLabel (or
label) with the percentage as its value.
Constructors
Section titled “Constructors”Gauge()
Section titled “Gauge()”| Parameter | Type | Default | Description |
|---|---|---|---|
value: | double | required | Fraction filled, clamped to 0..1. |
label: | String? | — | Optional label shown before the bar. |
showPercentage: | bool | true | Whether to show nn% after the bar. |
color: | Color? | — | Filled-bar color. Defaults to the theme’s primary. |
thresholds: | List<(double, Color)> | const <(double, Color)>[] | Optional (fraction, color) breakpoints, ascending. The fill takes the color of the highest breakpoint whose fraction the value has reached — the system-monitor convention (e.g. [(0.8, warning), (0.95, error)] turns the bar amber then red) so “high” reads without parsing the number. |
trackColor: | Color? | — | Empty-track color, always drawn dim. Defaults to the foreground of the theme’s muted style. |
semanticLabel: | String? | — | Label exposed through the semantic app graph. More |
semanticLabel: Defaults tolabelwhen present, otherwiseGauge.
Source
Section titled “Source”Gauge is defined in packages/fleury/lib/src/catalog/gauge.dart.
Category: Charts & meters · All widgets