createRenderer method
Widget build(BuildContext context) {
return Container(
child: SfCircularChart(
series: <RadialBarSeries<ChartData, String>>[
RadialBarSeries<ChartData, String>(
useSeriesColor:true
),
],
));
}
Implementation
// Create the Radial bar series renderer.
RadialBarSeriesRenderer createRenderer(CircularSeries<T, D> series) {
RadialBarSeriesRenderer seriesRenderer;
if (onCreateRenderer != null) {
seriesRenderer = onCreateRenderer!(series) as RadialBarSeriesRenderer;
// ignore: unnecessary_null_comparison
assert(seriesRenderer != null,
'This onCreateRenderer callback function should return value as extends from ChartSeriesRenderer class and should not be return value as null');
return seriesRenderer;
}
return RadialBarSeriesRenderer();
}