setScreenSize static method

void setScreenSize(
  1. BoxConstraints constraints,
  2. Orientation orientation
)

Saves the screenSzie for access through the extensions later

Implementation

static void setScreenSize(
  BoxConstraints constraints,
  Orientation orientation,
) {
  if (orientation == Orientation.portrait) {
    width = constraints.maxWidth;
    height = constraints.maxHeight;
  } else {
    width = constraints.maxHeight;
    height = constraints.maxWidth;
  }
}