WidgetPointer class
Create the pointer to indicate the value with built-in shape.
To highlight values, set any desired widget to child property.
Widget build(BuildContext context) {
return Container(
child: SfRadialGauge(
axes:<RadialAxis>[RadialAxis(
pointers: <GaugePointer>[WidgetPointer(value: 50,
widget: Container( height: 30, width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.red)),
child: Icon( Icons.check, color: Colors.black ))
)],
)]
));
}
- Inheritance
- Implemented types
Constructors
-
WidgetPointer({Key? key, double value = 0, bool enableDragging = false, ValueChanged<
double> ? onValueChanged, ValueChanged<double> ? onValueChangeStart, ValueChanged<double> ? onValueChangeEnd, ValueChanged<ValueChangingArgs> ? onValueChanging, AnimationType animationType = AnimationType.ease, bool enableAnimation = false, double animationDuration = 1000, GaugeSizeUnit offsetUnit = GaugeSizeUnit.logicalPixel, double offset = 0, required Widget child}) -
Create a widget 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
- child → Widget
-
A widget, which is to be used as the pointer.
final
- enableAnimation → bool
-
Whether to enable the pointer animation.
final
- enableDragging → bool
-
Whether to allow the pointer dragging.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- offset → double
-
Adjusts the widget pointer position.
final
- offsetUnit → GaugeSizeUnit
-
Calculates the pointer position either in logical pixel or radius factor.
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
- value → double
-
Specifies the value to the pointer.
final
Methods
-
createElement(
) → SingleChildRenderObjectElement -
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 RenderWidgetPointer 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