PrettyGauge class

Customizable Gauge widget for Flutter

Inheritance

Constructors

PrettyGauge({Key? key, double gaugeSize = 200, List<GaugeSegment>? segments, double minValue = 0, double maxValue = 100.0, double? currentValue, int currentValueDecimalPlaces = 1, Color needleColor = Colors.black, Color defaultSegmentColor = Colors.grey, Widget? valueWidget, Widget? displayWidget, bool showMarkers = true, TextStyle startMarkerStyle = const TextStyle(fontSize: 10, color: Colors.black), TextStyle endMarkerStyle = const TextStyle(fontSize: 10, color: Colors.black)})
const

Properties

currentValue double?
Current value of the Gauge
final
currentValueDecimalPlaces int
Current value decimal point places
final
defaultSegmentColor Color
The default Segment color. Defaults to Colors.grey
final
displayWidget Widget?
Widget to show any other text for the Gauge. Defaults to Container()
final
endMarkerStyle TextStyle
Custom styling for the Max marker. Defaults to black font with size 10
final
gaugeSize double
Size of the widget - This widget is rendered in a square shape
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxValue double
Supply a max value for the Gauge. Defaults to 100
final
minValue double
Supply a min value for the Gauge. Defaults to 0
final
needleColor Color
Custom color for the needle on the Gauge. Defaults to Colors.black
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segments List<GaugeSegment>?
Supply the list of segments in the Gauge.
final
showMarkers bool
Specify if you want to display Min and Max value on the Gauge widget
final
startMarkerStyle TextStyle
Custom styling for the Min marker. Defaults to black font with size 10
final
valueWidget Widget?
Widget that is used to show the current value on the Gauge. Defaults to show the current value as a Decimal with 1 digit If value must not be shown, supply Container()
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _PrettyGaugeState
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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