September 2019
Beginner
512 pages
12h 52m
English
To start with, we typically define a widget, to maintain a minimal level of organization. We define the PieChart widget here; this will be a StatelessWidget descendant. This widget should abstract the paint layer and expose just what is needed by other widgets. In our case, this is what the PieChart properties look like:
class PieChart extends StatelessWidget { final List<int> values; final List<Color> colors; ...}
The only properties that describe the widget are values and colors:
Read now
Unlock full access