size property
Calculate the size for the whole golden file
Implementation
Size get size {
final widths = _scenarios.mapGrouped(
(scenarios) => scenarios.fold<double>(
0.0, (acc, scenario) => acc + scenario.size.width),
n: nrColumns,
);
final totalWidth =
widths.fold(0.0, (double acc, value) => max(acc, value)) + _padding * 2;
final heights = _scenarios.mapGrouped(
(scenarios) => scenarios.fold<double>(
0.0, (acc, scenario) => max(acc, scenario.size.height)),
n: nrColumns,
);
final totalHeight =
heights.fold<double>(0.0, (acc, value) => acc + value) + _padding * 2;
return Size(totalWidth, totalHeight);
}