accepts method

bool accepts(
  1. int width,
  2. int height
)

Implementation

bool accepts(int width, int height) => portraitSizes.any(
  (s) =>
      (width == s.width && height == s.height) ||
      (width == s.height && height == s.width),
);