accepts method

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

Implementation

bool accepts(int width, int height) => portraitSizes.any((s) {
  final portrait = width == s.width && height == s.height;
  final landscape = width == s.height && height == s.width;
  return landscapeOnly ? landscape : portrait || landscape;
});