SfLinearGauge class
Creates a linear gauge widget to displays the values on a linear scale. It has a rich set of features such as axis, ranges, and pointers that are fully customizable and extendable.
Widget build(BuildContext context) {
return Container(
child: SfLinearGauge());
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SfLinearGauge
Constructors
-
SfLinearGauge({Key? key, double minimum = 0.0, double maximum = 100.0, double? interval, List<
LinearGaugeRange> ? ranges, List<LinearBarPointer> ? barPointers, List<LinearMarkerPointer> ? markerPointers, LinearGaugeOrientation orientation = LinearGaugeOrientation.horizontal, bool isAxisInversed = false, bool isMirrored = false, bool animateAxis = false, bool animateRange = false, int animationDuration = 1000, bool showLabels = true, bool showAxisTrack = true, bool showTicks = true, int minorTicksPerInterval = 1, bool useRangeColorForAxis = false, double axisTrackExtent = 0, LinearLabelPosition labelPosition = LinearLabelPosition.inside, LinearElementPosition tickPosition = LinearElementPosition.inside, double tickOffset = 0, double labelOffset = 4, int maximumLabels = 3, NumberFormat? numberFormat, GenerateLabelsCallback? onGenerateLabels, ValueToFactorCallback? valueToFactorCallback, FactorToValueCallback? factorToValueCallback, LabelFormatterCallback? labelFormatterCallback, TextStyle? axisLabelStyle, LinearAxisTrackStyle? axisTrackStyle, LinearTickStyle? majorTickStyle, LinearTickStyle? minorTickStyle}) - Creates a linear gauge
Properties
- animateAxis → bool
-
Specifies the animation for axis.
final
- animateRange → bool
-
Specifies the animation for range.
final
- animationDuration → int
-
Specifies the load time animation duration.
Duration is defined in milliseconds.
final
- axisLabelStyle → TextStyle?
-
Specifies the label style of axis.
final
- axisTrackExtent → double
-
Extends the axis on both ends with the specified value.
final
- axisTrackStyle → LinearAxisTrackStyle
-
Customizes the style of the axis line.
final
-
barPointers
→ List<
LinearBarPointer> ? -
Customizes each bar pointer by adding it to the barPointers collection.
final
- factorToValueCallback → FactorToValueCallback?
-
Returns the converted axis value from the factor.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interval → double?
-
Specifies the interval between major ticks in an axis.
final
- isAxisInversed → bool
-
Determines whether to inverse an axis in a SfLinearGauge.
final
- isMirrored → bool
-
Determines whether to mirror the linear gauge.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelFormatterCallback → LabelFormatterCallback?
-
Called when the labels are been generated.
final
- labelOffset → double
-
Specifies the offset value of labels to custom-position them.
final
- labelPosition → LinearLabelPosition
-
Specifies the position of labels with respect to an axis.
final
- majorTickStyle → LinearTickStyle
-
The style to use for the major axis tick lines.
final
-
markerPointers
→ List<
LinearMarkerPointer> ? -
Add a list of gauge shape and widget pointer to the linear gauge and customize
each pointer by adding it to the markerPointers collection.
final
- maximum → double
-
Specifies the maximum value of an axis. The axis ends at this value.
final
- maximumLabels → int
-
The maximum number of labels to be displayed in 100 logical pixels.
final
- minimum → double
-
Specifies the minimum value of an axis. The axis starts with this value.
final
- minorTicksPerInterval → int
-
Specifies the minor ticks count per interval in an axis.
final
- minorTickStyle → LinearTickStyle
-
The style to use for the minor axis tick lines.
final
- numberFormat → NumberFormat
-
Specifies the number format.
final
- onGenerateLabels → GenerateLabelsCallback?
-
Returns the visible labels on SfLinearGauge
final
- orientation → LinearGaugeOrientation
-
Specifies the orientation of SfLinearGauge.
final
-
ranges
→ List<
LinearGaugeRange> ? -
Customizes each range by adding it to the ranges collection.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAxisTrack → bool
-
Determines whether to show an axis track in SfLinearGauge.
final
- showLabels → bool
-
Determines whether to show the labels in an axis.
final
- showTicks → bool
-
Determines whether to show ticks.
final
- tickOffset → double
-
Specifies the offset value of ticks to custom-position them.
final
- tickPosition → LinearElementPosition
-
Specifies the position of ticks with respect to axis.
final
- useRangeColorForAxis → bool
-
Determines whether to use range color for an axis in SfLinearGauge.
final
- valueToFactorCallback → ValueToFactorCallback?
-
Returns the converted factor value from the axis value
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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, 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