gridSize static method

int gridSize(
  1. double width
)

Method to return grid size name

Implementation

static int gridSize(double width) {
  var sizeName = xs;
  if (width >= 576 && width < 768) {
    sizeName = sm;
  } else if (width >= 768 && width < 992) {
    sizeName = md;
  } else if (width >= 992 && width < 1200) {
    sizeName = lg;
  } else if (width >= 1200 && width < 1366) {
    sizeName = xl;
  } else if (width >= 1366 && width < 1440) {
    sizeName = xxl;
  } else if (width >= 1440) {
    sizeName = xxxl;
  }

  return sizeName;
}