ArcGauge class
A partial-arc progress gauge with rich overlay and layout support.
Place a child widget at the centre, attach header / footer labels, or use a widgetIndicator that moves with the arc tip. The reverse flag fills the arc from the far end, fillColor colours the inner circle, and unitText appends a unit suffix to the auto-formatted centre value.
ArcGauge(
controller: cpuCtrl,
unitText: '%',
fillColor: Colors.black12,
header: const Text('CPU', style: TextStyle(fontWeight: FontWeight.bold)),
footer: const Text('utilisation'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ArcGauge
Constructors
-
ArcGauge({Key? key, required GaugeController controller, double min = 0, double max = 100, double startAngleDeg = 135, double sweepAngleDeg = 270, String? centerLabel, TextStyle? centerLabelStyle, List<
GaugeRange> ranges = const [], GaugeStyle? style, GaugeMode? mode, String? semanticsLabel, Widget? child, Widget? header, Color? fillColor, bool reverse = false, bool showValue = true, String? unitText, Widget? widgetIndicator, double? backgroundWidth}) -
const
- ArcGauge.cpuUsage({Key? key, required GaugeController controller, GaugeStyle? style, GaugeMode? mode, Widget? child, Widget? header, Widget? widgetIndicator, String? semanticsLabel})
-
CPU usage preset (0–100 %).
factory
- ArcGauge.networkSpeed({Key? key, required GaugeController controller, double maxMbps = 100, GaugeStyle? style, GaugeMode? mode, Widget? child, Widget? header, String? unitText, Widget? widgetIndicator, String? semanticsLabel})
-
Download/upload speed preset (0–
maxMbpsMbps).factory
Properties
- backgroundWidth → double?
-
Override for the background track stroke width (logical pixels).
final
- centerLabel → String?
-
Overrides the auto-formatted centre value label.
final
- centerLabelStyle → TextStyle?
-
Text style for the centre label.
final
- child → Widget?
-
Widget shown at the centre of the gauge (replaces the canvas value label
when provided).
final
- controller → GaugeController
-
final
- fillColor → Color?
-
Solid fill colour for the circle inside the arc track.
final
-
Widget shown directly below the gauge.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Widget shown directly above the gauge.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- max → double
-
final
- min → double
-
final
- mode → GaugeMode?
-
Ambient / instrument rendering mode.
final
-
ranges
→ List<
GaugeRange> -
Coloured band segments drawn over the background track.
final
- reverse → bool
-
When
true, fills the arc from the far (clockwise) end of the track rather than from the start.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → String?
-
Accessibility label announced by screen readers.
final
- showValue → bool
-
Whether to render the auto-formatted value in the centre.
final
- startAngleDeg → double
-
final
- style → GaugeStyle?
-
Visual style. Falls back to GaugeThemeExtension then DefaultGaugeStyle.
final
- sweepAngleDeg → double
-
final
- unitText → String?
-
Unit suffix appended to the auto-formatted centre label (e.g.
'%').final - widgetIndicator → Widget?
-
Widget that tracks the current arc tip position.
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.
inherited
-
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