gauge_kit 0.6.0
gauge_kit: ^0.6.0 copied to clipboard
15 Flutter gauge widgets — radial, linear, arc & more. Material 3, Cupertino & Executive styles. Zero dependencies. MIT licensed.
0.6.0 #
- Dashboard Kit — a new high-level widget layer (
gauge_kit_dashboard_kit.dart) built on top of the core engine, for the card-based "smart dashboard" style used by modern in-car booking/rental UIs: dark glass cards, gradient rings/bars, and accent glow, in a responsive bento grid. Nothing here is a new rendering engine — every widget is a thinStatelessWidgetthat configuresArcGauge/LinearGaugeviaGaugeStyle/GaugeTokensOverride.DashboardCard/DashboardCardHeader/DashboardCardStyle— shared glass-card chrome (background, border, glow, text styles).GaugeRingCard/GaugeBarCard— composite gauge widgets that wrapArcGauge/LinearGaugein aDashboardCard, with anaccentColor+colorForValueshorthand for the common case and agaugeStyleescape hatch for full token-level control.- Eight ready-made car-domain presets —
SpeedStatCard,BatteryStatCard,RangeStatCard,EcoScoreStatCard,ClimateStatCard,TirePressureStatCard,FuelStatCard,TripStatCard— each needing only aGaugeControllerto drop in. GaugeListTile— a full-width row primitive (icon, label, big value, slim inline indicator), for a settings-style grouped list instead of a grid of tiles. Stack several inside oneDashboardCardwith dividers.StatCardGrid— a responsive hero-card-plus-grid layout that adapts its column count to the available width.
LinearGaugenow honoursGaugeTokens.valueGradientfor its bar fill, matching the gradient supportRadialGaugeandArcGaugealready had. This was a genuine gap — the pill-shaped gradient bars used byGaugeBarCardwere not achievable before this fix.DashboardCardHeader's label is now wrapped inFlexiblewith an ellipsis, so longer labels (e.g. "TYRE PRESSURE") no longer overflow narrow grid tiles.DashboardCardStyle.trackColor— new field controlling the unfilled portion of a ring/bar/list-tile gauge. Previously hardcoded to a faint white wash insideGaugeRingCard/GaugeBarCard/GaugeListTile, which made the empty track invisible against a light/white card background — a real bug found while building a light-themed layout variant.GaugeRingCard,GaugeBarCard, andGaugeListTilenow all read this fromcardStyle.SpeedStatCardgained atrackWidthparameter (default10, matchingGaugeRingCard) so an oversized hero ring can use a proportionally thicker stroke.- Example app: new "Kit" tab (
SmartCarDashboardKitScreen) — an in-app switcher across four structurally different dashboard compositions (not just a recolor of one grid), each pairing a distinct layout with a distinct palette:- Bento Grid (Midnight) — hero ring +
StatCardGrid. - List (Luxury Gold) — compact hero banner + one grouped
GaugeListTilelist. - Carousel (Neon Aurora) — an oversized centred hero dial with a horizontally swipeable strip of secondary cards.
- Split Console (Daylight) — a wide dual-pane layout (hero left,
scrollable stat list right), the shape of an actual in-car centre
console rather than a phone screen.
All four share the same eight
GaugeControllers and a live-updating speed/battery/range simulation with a Start/End Trip toggle.
- Bento Grid (Midnight) — hero ring +
0.5.0 #
RadialGauge.fillColor— new parameter for a solid dial-face fill drawn beneath the track, ticks, and needle.ArcGaugealready had this;RadialGaugedid not, which made classic skeuomorphic analog gauge clusters (opaque dial face against a transparent background) impossible to build. Threaded through all four named presets (.speedometer,.tachometer,.fuel,.compass).- Example app: new "Styles" tab (
CarStylesDashboardScreen) showcasing three automotive instrument-cluster design languages built entirely from existing gauge_kit widgets:- Minimalist EV cluster — plain digital speed readout,
DeltaGaugeas a centre-zero regen/power meter,ArcGaugebattery, compact heading indicator - Analog twin-dial cluster — two large
RadialGaugedials with a solid dark face via the newfillColor, flanked by a digital gear readout andLinearGaugefuel/temp bars - Centered tachometer cluster — a five-dial classic layout with an
oversized centre tachometer, all sharing a cream analog face via
fillColor
- Minimalist EV cluster — plain digital speed readout,
- README: documented
RadialGauge.fillColorand added the three new gallery screenshots.
0.4.0 #
SparklineGauge— new 15th gauge type: a compact trend-line widget that plots a rolling window of sample history, for showing a recent trend next to a live number (CPU load, network throughput, sensor readings, etc.).SparklineController— new controller type backingSparklineGauge. UnlikeGaugeController, it tracks a bounded history of discrete samples (addSample,samples,latest,clear) rather than a single live value, so it isn't polluted by per-frame animation ticks.SparklineGaugesupports auto-scaling (min/maxdefault to the visible sample window), an optional area fill under the line, a last-point marker, and the existingvalueGlowRadius/valueGlowColorglow tokens.- Example app:
ServerDashboardScreennow includes a live "CPU Core 1" sparkline fed from the same controller driving the CPU arc gauge. gauge_kit_rendering.dartnow also exportsSparklineGaugeRenderBoxfor direct render-object access.
0.3.4 #
- No code changes — fixes the automated publishing pipeline dispatching
publish.ymlagainstmaininstead of the newly created tag. pub.dev's trusted publishing config requires the OIDC token's ref to haverefType: tagmatchingv{{version}}; dispatching against a branch caused0.3.3's publish attempt to fail with "publishing is only allowed from 'tag' refType".
0.3.3 #
- No code changes — end-to-end test of the fixed automated publishing pipeline
(
release.ymlnow explicitly dispatchespublish.ymlinstead of relying on a tag-push event, which GitHub's loop-prevention rule silently drops when the tag is created byGITHUB_TOKEN).
0.3.2 #
- No code changes — republishes the
0.3.1metadata fix through the new automated pub.dev publishing pipeline (GitHub Actions OIDC trusted publishing).
0.3.1 #
pubspec.yaml— shorteneddescriptionto fit pub.dev's recommended 60–180 character range, fixing a lost "Follow Dart file conventions" pub point.
0.3.0 #
GaugeAnnotation— new class for pinning arbitrary Flutter widgets at specific value positions around theRadialGaugearc. SupportsradiusFractionandoffsetfor precise placement.RadialGauge— converted toStatelessWidgetwrapper supportingchild(centre overlay),annotations(List<GaugeAnnotation>),labelFormatter(custom tick text), andunitText(centre value suffix).ArcGauge— converted toStatelessWidgetwrapper with a full new layout tier:child(centre overlay),header/footerlabels,fillColor(inner circle),widgetIndicator(moving tip widget),reverse(fill from far end),showValue,unitText, andbackgroundWidth(override track stroke width).LinearGauge— converted toStatelessWidgetwrapper withleading/trailingend widgets,centeroverlay,widgetIndicator(moving tip widget),reverse,showValue,unitText,labelFormatter, andbarRadius(rounded filled-bar mode).- Glow effects —
GaugeTokens.valueGlowRadius(double, default0.0) andGaugeTokens.valueGlowColor(Color?) added to all arc/linear render engines; positive radius renders a soft outer glow behind the value arc or bar. GaugeController.animateTo()— newonAnimationEndcallback fires when the animation completes.- All new params are optional with sensible defaults — existing code requires zero changes.
0.2.0 #
GaugeController.animateTo()— new self-contained animation API; no externalAnimationControllerrequired. Accepts optionaldurationandcurveoverrides.GaugeTokens— all constructor parameters are now optional with sensible defaults, making it easier to create partial token overrides in custom styles.GaugePointer— new class for adding extra needles toRadialGaugewith independent controllers, colors, and optional labels.RadialGauge.extraPointers— accepts aList<GaugePointer>to render multiple concentric needles on a single gauge face.DeltaGauge.lowerIsBetter— boolean flag that inverts the positive/negative color semantics for "lower is better" metrics such as loss functions or lap times.- Semantics — all 14 gauge widgets now wrap their canvas in a
Semanticsnode and announce the current value to screen readers on every update. semanticsLabelparam — added to all gauge widgets; overrides the default auto-generated accessibility label with a custom string.gauge_kit_rendering.dart— new advanced barrel export exposing internal render box types for consumers who need direct access to the render layer.- Internal cleanup: engine render boxes (
RenderRadialGauge,RenderArcGauge, etc.) removed from the maingauge_kit.dartpublic export to keep the default surface area small; importgauge_kit_rendering.dartto access them.
0.1.0 #
- Initial release.
- 14 gauge widget types:
RadialGauge,LinearGauge,SegmentedGauge,ArcGauge,ThermometerGauge,BulletGauge,TankGauge,InclinometerGauge,StatusGauge,DeltaGauge,ArtificialHorizonGauge,OdometerGauge,LevelMeterGauge,TapeGauge. - 3 built-in styles:
MaterialGaugeStyle,CupertinoGaugeStyle,ExecutiveGaugeStyle. GaugeModeenum withambientandinstrumentvariants.GaugeThemeExtensionfor FlutterThemeExtensionintegration.GaugeController(ChangeNotifier) for value management.- Pure Canvas rendering via
LeafRenderObjectWidget— zero external dependencies. - Static-layer picture caching for performant animation.
- CVD-safe color defaults (Paul Tol scheme).
UnitConverterutility for speed, temperature, pressure, and power conversions.- MIT license.