offset property
Adjusts the widget pointer position.
You can specify position value either in logical pixel or radius factor using the offsetUnit property.
If offsetUnit is GaugeSizeUnit.factor
, value can be specified from
0 to 1. Here pointer placing position is calculated by
(offset * axis radius value). For example: offset value is 0.2
and axis radius is 100, pointer is moving 20(0.2 * 100) logical pixels
from axis outer radius.
If offsetUnit is GaugeSizeUnit.logicalPixel
, pointer will move to the
defined value's distance from the outer radius axis.
If you specify negative value to this property, the pointer will be positioned outside the axis.
Defaults to 0
and offsetUnit is GaugeSizeUnit.logicalPixel
.
Widget build(BuildContext context) {
return Container(
child: SfRadialGauge(
axes:<RadialAxis>[RadialAxis(
pointers: <GaugePointer>[WidegtPointer(offset: 30,
widget: Container( height: 30, width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.red)),
child: Icon( Icons.check, color: Colors.black ))
value: 20)],
)]
));
}
Implementation
final double offset;