performLayout method
Hook for subclasses to perform layout within the given constraints.
Implementation
@override
Size performLayout(BoxConstraints constraints) {
final grid = widget as Grid;
calculatedHeight = grid.tiles.length;
calculatedWidth = calculatedHeight > 0 ? grid.tiles[0].length : 0;
return constraints.constrain(Size(calculatedWidth, calculatedHeight));
}