LinearGauge class

Creates a LinearGauge Widget to display the values in a linear scale. The widget can be customized using the properties available in LinearGauge.

LinearGauge(
  steps: 2,
  start: 0,
  end: 100,
  rulers: RulerStyle(
          rulerPosition : RulerPosition.bottom,
      ),
 ),
Inheritance

Constructors

LinearGauge({Key? key, double? start = 0, double? end = 100, double? steps = 0, @Deprecated('Use ValueBar instead') double? value = 0, GaugeOrientation? gaugeOrientation = GaugeOrientation.horizontal, bool? showLinearGaugeContainer = true, LinearGaugeBoxDecoration? linearGaugeBoxDecoration = const LinearGaugeBoxDecoration(), double? labelTopMargin = 0.0, required RulerStyle? rulers, List<RangeLinearGauge>? rangeLinearGauge = const [], List<CustomRulerLabel>? customLabels = const [], ValueBarPosition? valueBarPosition = ValueBarPosition.center, List<ValueBar>? valueBar = const [], List<BasePointer>? pointers = const [], bool enableGaugeAnimation = false, double? extendLinearGauge = 0, bool fillExtend = false, double animationGap = 0, int animationDuration = 1000, Curve animationType = Curves.ease, List<CustomCurve>? curves = const []})
LinearGauge is a visualization of measurement widget with a linear scale values. LinearGauge as rich sets of config parameters which can be modified as per requirement

Properties

animationDuration int
Specifies the load time animation duration with enableAnimation. Duration is defined in milliseconds.
final
animationGap double
animationGap sets the duration gap b/w the gauge animations and other pointer or value bar animations .
final
animationType Curve
Specifies the animation type of pointers.
final
curves List<CustomCurve>?
curves takes the list of CustomCurve to render the curves in LinearGauge
final
customLabels List<CustomRulerLabel>?
customLabels allows for the creation of custom tick labels on the gauge's scale, enabling the display of non-standard values or units, and allowing for more specific labelling of the gauge's range
final
enableGaugeAnimation bool
enableAnimation will enable animations for pointers and value bars. It's default to false.
final
end double?
end Sets the ending label of the LinearGauge Container This will be overridden when users add CustomRulerLabel the last value from the list will be used as end
final
extendLinearGauge double?
extendLinearGauge Sets the rulers & labels away from the ending points of LinearGauge Container
final
fillExtend bool
fillExtend Sets the fill of extendedLinearGauge according to nearest range or value bar color. It's default to false.
final
gaugeOrientation GaugeOrientation?
gaugeOrientation sets the LinearGauge orientation to horizontal or vertical
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelTopMargin double?
Warning:deprecated
final
linearGaugeBoxDecoration LinearGaugeBoxDecoration?
linearGaugeBoxDecoration sets the styles of Container using LinearGaugeBoxDecoration decoration properties
final
pointers List<BasePointer>?
pointers takes the list of Pointer to render the value pointer/s
final
rangeLinearGauge List<RangeLinearGauge>?
rangeLinearGauge takes the list of RangeLinearGauge to render the ranges in LinearGauge
final
rulers RulerStyle?
rulerStyle sets the styles of label using RulerStyle properties
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLinearGaugeContainer bool?
showLinearGaugeContainer controls the LinearGauge Container render
final
start double?
start Sets the starting label of the LinearGauge Container This will be overridden when users add CustomRulerLabel, the first value from the list will be used as start
final
steps double?
steps Sets the interval between label of the LinearGauge Container
final
value double?
@deprecated Value replaced by valueBar property
final
valueBar List<ValueBar>?
valueBar takes the list of ValueBar to render the value bar/s
final
valueBarPosition ValueBarPosition?
valueBarPosition sets the position of the value bar from the LinearGauge default is to valueBarPosition =ValueBarPosition.center`
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<LinearGauge>
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