September 2019
Beginner
512 pages
12h 52m
English
The RadialChart widget is very similar to the PieChart widget defined before, with the same parameters and the same fundamental objective. The only thing we need to take a look at here is its build() method:
// part of radial_chart.dart RadialChart widget @override Widget build(BuildContext context) { return Row( children: <Widget>[ Expanded( child: CustomPaint( painter: RadialChartPainter( values, colors, Theme.of(context).textTheme.display1, Directionality.of(context), ), ), ), ], ); }
As you can see, the difference is in the value passed to the painter property of the CustomPaint widget. Here, we use a new RadialChartPainter class that has its own paint() implementation. Besides the values and colors, we pass two additional ...
Read now
Unlock full access