calcColumns static method
int?
calcColumns({
- Size? size,
- Orientation? orientation,
- required FlexColumns columns,
- BuildContext? context,
Calc the number of columns, for the screen and rotation config used actually in the device
Implementation
static int? calcColumns(
{Size? size,
Orientation? orientation,
required FlexColumns columns,
BuildContext? context}) {
if (context != null) {
size = MediaQuery.of(context).size;
orientation = MediaQuery.of(context).orientation;
}
return columns.values[gridSize(size!.width)];
}