gradient property
A gradient to use when filling the range.
gradient of GaugeRange only support SweepGradient and specified SweepGradient.stops are applied within the range value.
Defaults to null
.
Widget build(BuildContext context) {
return Container(
child: SfRadialGauge(
axes:<RadialAxis>[RadialAxis(
ranges: <GaugeRange>[GaugeRange(startValue: 0,
endValue: 100, startWidth: 10, endWidth: 10,
gradient:SweepGradient(
colors: const <Color>[Colors.red, Color(0xFFFFDD00),
Color(0xFFFFDD00), Color(0xFF30B32D),],
stops: const <double>[0, 0.2722222, 0.5833333, 0.777777,],
))],
)]
));
}
Implementation
final Gradient? gradient;