calcColumns static method

int? calcColumns({
  1. Size? size,
  2. Orientation? orientation,
  3. required FlexColumns columns,
  4. 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)];
}