gradient property
A gradient to use when filling the needle pointer.
gradient of NeedlePointer only support LinearGradient. You can use this to display the depth effect of the needle pointer.
Defaults to null
.
Widget build(BuildContext context) {
return Container(
child: SfRadialGauge(
axes:<RadialAxis>[RadialAxis
( pointers: <GaugePointer>[
NeedlePointer( color: Colors.blue, value: 30
gradient: LinearGradient(
colors: const <Color>[Color.fromRGBO(28, 114, 189, 1),
Color.fromRGBO(28, 114, 189, 1),
Color.fromRGBO(23, 173, 234, 1),
Color.fromRGBO(23, 173, 234, 1)],
stops: const <double>[0,0.5,0.5,1],
)
)])]
));
}
Implementation
final LinearGradient? gradient;