gauge_kit library
gauge_kit — Production-ready Flutter gauge library.
Import this file to access all gauges, styles, and utilities:
import 'package:gauge_kit/gauge_kit.dart';
Classes
- ArcGauge
- A partial-arc progress gauge with rich overlay and layout support.
- ArtificialHorizonGauge
- An artificial horizon / attitude indicator for avionics UIs. Uses two controllers: pitchController (degrees up/down) and rollController (degrees left/right).
- BulletGauge
- A Stephen Few-style bullet chart.
- CupertinoGaugeStyle
- iOS / Cupertino gauge style. Uses CupertinoTheme colors.
- DefaultGaugeStyle
- Fallback style used when no GaugeThemeExtension is found.
- DeltaGauge
- A delta / change-from-baseline gauge.
- ExecutiveGaugeStyle
- Executive / dark-panel industrial gauge style. Black background, chrome accents, amber needle — no Flutter theme dependency.
- GaugeAnimation
- Immutable configuration for a gauge value-change animation.
- GaugeAnnotation
- Pins a Flutter Widget at a specific value position on a RadialGauge.
- GaugeController
- Controls the current value of a gauge widget.
- GaugeLabelStyle
- GaugePointer
- An additional needle that can be overlaid on a RadialGauge.
- GaugeRange
- A colored band painted on the gauge track between min and max.
- GaugeStyle
- Abstract strategy that resolves GaugeTokens from context + mode. Engine files must never import style files — they only consume GaugeTokens.
- GaugeThemeExtension
- Flutter ThemeExtension that supplies GaugeStyle and defaultMode to any widget in the subtree.
- GaugeTickStyle
- GaugeTokens
- Immutable set of resolved design tokens consumed by every render engine.
- GaugeTokensOverride
- Partial override applied on top of a resolved GaugeTokens.
- HorizonGaugeTokens
- Extended token set for the ArtificialHorizonGauge.
- InclinometerGauge
-
A spirit-level / inclinometer gauge.
controller.valueis tilt in degrees. - LevelMeterGauge
- A vertical level meter (VU meter / audio level).
- LinearGauge
- A horizontal or vertical linear progress gauge with overlay and layout support.
- MaterialGaugeStyle
- Material 3 gauge style. Reads color scheme from the nearest Theme.
- OdometerGauge
- A rolling-digit odometer display.
- RadialGauge
- A radial (circular) gauge with needle, ticks, labels, ranges, extra pointers, annotations, and full accessibility support.
- SegmentedGauge
- A discrete LED-segment gauge.
- StatusGauge
-
A simple status indicator.
controller.value: 0=normal, 1=warning, 2=danger. - TankGauge
- A liquid-tank fill gauge.
- TapeGauge
- A scrolling tape gauge (altimeter / airspeed indicator style).
- ThermometerGauge
-
A classic thermometer gauge.
controller.valueis in Celsius. - UnitConverter
- Utility class for common unit conversions used by gauge widgets.
Enums
- GaugeMode
- Controls the visual density and animation timing of every gauge widget.
- LinearGaugeOrientation
- NeedleTipStyle
- Shape drawn at the tip of the gauge needle.
- TemperatureScale
- Temperature scale selector.
Extensions
Constants
- kCBSafeDanger → const Color
- kCBSafeNormal → const Color
- kCBSafeWarning → const Color
Functions
-
degToRad(
double deg) → double - Degrees → radians.
-
lerpDouble(
double a, double b, double t) → double -
niceTick(
double range, {int targetDivisions = 5}) → double -
Computes a "nice" tick interval for
rangeaiming fortargetDivisions. Uses the Wilkinson-style algorithm: try 1, 2, 2.5, 5, 10 multipliers. -
valueToAngle(
double value, double min, double max, double startAngle, double sweepAngle) → double -
Maps
valuelinearly onto the angular rangestartAngle, startAngle + sweepAngle. Angles are in radians.valueis clamped tomin, max. -
valueToFraction(
double value, double min, double max) → double -
Maps
valuelinearly to a fraction in0, 1.