fits method

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

Implementation

bool fits(int width, int height) {
  if (width < minWidth ||
      width > maxWidth ||
      height < minHeight ||
      height > maxHeight) {
    return false;
  }
  final ratio = this.ratio;
  return ratio == null || width * ratio.$2 == height * ratio.$1;
}