contains method Null safety

bool contains(
  1. num px,
  2. num py
)

Implementation

bool contains(num px, num py) =>
    left <= px && top <= py && right > px && bottom > py;