layout method
void
layout(
- Context context,
- BoxConstraints constraints, {
- bool parentUsesSize = false,
override
First widget pass to calculate the children layout and bounding box
Implementation
@override
void layout(Context context, BoxConstraints constraints,
{bool parentUsesSize = false}) {
super.layout(context, constraints, parentUsesSize: parentUsesSize);
final datasets = Chart.of(context).datasets;
final size = constraints.biggest;
gridBox = PdfRect(0, 0, size.x, size.y);
for (final dataset in datasets) {
dataset.layout(context, BoxConstraints.tight(gridBox.size));
}
}