gx_gauge 1.1.0
gx_gauge: ^1.1.0 copied to clipboard
Customizable Flutter gauges: linear progress, stepper, scale and bar gauges plus radial gauges with ranges, ticks, labels, needles and animation (formerly girix_code_gauge).
Changelog #
All notable changes to this package are documented here. The format follows Keep a Changelog, and the package uses Semantic Versioning.
1.1.0 - 2026-10-22 #
Added #
- Radial center value:
GxRadialGaugetakesvalueFormatterandvalueStylefor the painted center value, andcenterBuilderto replace it with any widget (centered where the value would be drawn, and fed the animated value). New public typedefsGxValueFormatterandGxCenterBuilder.
Changed #
- Painted text follows the system text size. Every gauge now scales its tick labels, value text, step markers, bar labels, needle labels and tooltips with
MediaQuery.textScalerOf. Apps with a larger font size set on the device will see larger gauge text; cap it by wrapping a gauge in aMediaQuerywith a clampedtextScaler. - Reduce motion is honoured. When the platform's
MediaQuery.disableAnimationsis on, value changes jump to the new value instead of animating.
1.0.1 - 2026-09-29 #
Changed #
- README and package description now mention that
gx_gaugewas formerly published asgirix_code_gauge, and link to the migration guide. No code changes.
1.0.0 - 2026-09-29 #
The first release under the name gx_gauge. The package was previously published as girix_code_gauge. doc/MIGRATION.md maps every old API to the new one.
Added #
- Implicit animation on every gauge:
durationandcurveanimate value changes, continuing from the value on screen when interrupted. - Interaction:
onChanged/onChangeEndon the progress, scale, bar and radial gauges (the radial gauge works like a knob), andonStepTappedon the stepper. Interactive gauges are adjustable by screen readers. - Vertical gauges:
direction: Axis.verticalon all linear gauges. - Right-to-left support: linear gauges mirror in RTL locales, and
reverseflips them. - Accessibility:
semanticLabelandsemanticValueFormatter. - Theme-aware defaults: colors you don't set come from the app's
ColorScheme, so dark mode works. - Ranges:
GxLinearRangebands on the scale gauge, with label, gradient and border.- Radial range labels and gradients.
- Needles and markers:
- Needle labels with a
{value}placeholder. - Marker widgets on the scale gauge.
- Custom needle painting on the scale gauge.
- Needle labels with a
- Bars:
GxLinearBarPointerthickness,position,offset, gradient and border. - Models:
copyWith,==/hashCodeand DevTools diagnostics on every model.
Changed #
- Names: every public type has the
Gxprefix, and the widgets areGxLinearProgressGauge,GxLinearStepperGauge,GxLinearScaleGauge,GxLinearBarGaugeandGxRadialGauge. - Values and ranges:
- Bars and ranges take explicit
start/endvalues instead of segment lengths. - The stepper takes
currentStep(an index). GxLinearScaleGaugetakes aGxGaugeValue.
- Bars and ranges take explicit
- Sizing: gauges size themselves from their parent. Linear gauges take a
heightand fill the width; the radial gauge takes an optionaldiameter. - Needle placement: a scale gauge's needle and marker needles are positioned relative to the axis, and a
bottomneedle sits fully below the track, mirroringtop. - Radial gauge layout:
- When a needle is shown, the center value moves below the needle's hub.
- Range labels sit inside a band that is shifted inwards.
- Number formatting: displayed values drop trailing zeros (
65rather than65.0). - Requirements: Flutter 3.47 / Dart 3.13 or later. The package has no dependencies beyond Flutter.
Removed #
GxAnimatedProgressLinearGauge/GaugeAnimationType. Usedurationandcurveon any gauge.- Exported painters and utilities (
ProgressLinearPainter,RadialGaugePainter,BasePainter,AnimationUtils). FillAreaPointer. UseGxLinearRange.- Parameters that had no effect:
orientation,gaugeType,direction(bar),showTooltip,alignment,showNeedleInsideBar,RadialTickLabelStyle.offsetandRadialPointerShape.custom.
Fixed #
- Radial gauge:
- It ignored
min, so the arc, needle, pointers, ranges and ticks were misplaced whenevermin != 0. - Minor ticks ran past the end of the arc, and
showMinorTicksdid nothing without major ticks or labels. - Range labels were never drawn.
- It ignored
- Ticks: tick generation could divide by zero, produce NaN, or mislabel ticks for some intervals.
- Scale gauge:
showMajorTicks: falsewas ignored.- Ticks, needle and bars didn't line up when
axisSpaceExtent > 0. - Bars were invisible with the default
tickPosition.
- Repainting: painters now repaint whenever anything they draw changes.
- Animated progress gauge: it leaked listeners, asserted on overshooting curves and snapped back when interrupted.
- Stepper: it divided by zero with one step.
- Tooltip: a filled tooltip's text was invisible, and tooltip text now uses the theme's label style (including its font).
- Stepper labels: the first and last step labels now stay inside the gauge instead of spilling past its edges.
- Needles: rectangle needles ignored their height, and outlined needles were hairlines by default.
copyWith:RadialTickStyle.copyWithdroppedalignmentandposition.
girix_code_gauge #
Releases published under the previous package name.
0.0.6 #
- Bug fixes.
0.0.5 #
- Custom needle painter for the linear bar gauge.
0.0.4 #
- Documentation updates; debug logs removed.
0.0.2 #
- Documentation updates.
0.0.1 #
- Initial release: progress, scale, bar and stepper linear gauges, and a radial gauge with gradient, ranges and pointers.
