NeedlePointer class

Create the pointer to indicate the value with needle or arrow shape.

NeedlePointer contains three parts, namely needle, knob, and tail and that can be placed on a gauge to mark the values.

Widget build(BuildContext context) {
   return Container(
       child: SfRadialGauge(
         axes:<RadialAxis>[RadialAxis
         ( pointers: <GaugePointer>[
            NeedlePointer( value: 30,
          )])]
       ));
}
Inheritance
Implemented types

Constructors

NeedlePointer({Key? key, double value = 0, bool enableDragging = false, ValueChanged<double>? onValueChanged, ValueChanged<double>? onValueChangeStart, ValueChanged<double>? onValueChangeEnd, ValueChanged<ValueChangingArgs>? onValueChanging, KnobStyle? knobStyle, TailStyle? tailStyle, LinearGradient? gradient, double needleLength = 0.6, GaugeSizeUnit lengthUnit = GaugeSizeUnit.factor, double needleStartWidth = 1, double needleEndWidth = 10, NeedlePointerRendererFactory<NeedlePointerRenderer>? onCreatePointerRenderer, bool enableAnimation = false, double animationDuration = 1000, AnimationType animationType = AnimationType.ease, Color? needleColor})
Create a needle pointer with the default or required properties.
const

Properties

animationDuration double
Specifies the duration of the pointer animation.
final
animationType AnimationType
Specifies the different type of animation for pointer.
final
enableAnimation bool
Whether to enable the pointer animation.
final
enableDragging bool
Whether to allow the pointer dragging.
final
gradient LinearGradient?
A gradient to use when filling the needle pointer.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
knobStyle KnobStyle
The style to use for the needle knob.
final
lengthUnit GaugeSizeUnit
Calculates the needle pointer length either in logical pixel or radius factor.
final
needleColor Color?
Specifies the color of the needle pointer.
final
needleEndWidth double
Specifies the end width of the needle pointer in logical pixels.
final
needleLength double
Adjusts the needle pointer length from center.
final
needleStartWidth double
Specifies the start width of the needle pointer in logical pixels.
final
onCreatePointerRenderer NeedlePointerRendererFactory<NeedlePointerRenderer>?
The callback that is called when the custom renderer for the needle pointer is created. and it is not applicable for built-in needle pointer
final
onValueChanged ValueChanged<double>?
Called during a drag when the user is selecting a new value for the pointer by dragging.
final
onValueChangeEnd ValueChanged<double>?
Called when the user is done selecting a new value of the pointer by dragging.
final
onValueChangeStart ValueChanged<double>?
Called when the user starts selecting a new value of pointer by dragging.
final
onValueChanging ValueChanged<ValueChangingArgs>?
Called during a drag when the user is selecting before a new value for the pointer by dragging.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tailStyle TailStyle?
The style to use for the needle tail.
final
value double
Specifies the value to the pointer.
final

Methods

createElement() LeafRenderObjectElement
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
createRenderObject(BuildContext context) RenderObject
Creates an instance of the RenderObject class that this RenderObjectWidget represents, using the configuration described by this RenderObjectWidget.
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
didUnmountRenderObject(covariant RenderObject renderObject) → void
A render object previously associated with this widget has been removed from the tree. The given RenderObject will be of the same type as returned by this object's createRenderObject.
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
updateRenderObject(BuildContext context, covariant RenderNeedlePointer renderObject) → void
Copies the configuration described by this RenderObjectWidget to the given RenderObject, which will be of the same type as returned by this object's createRenderObject.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited