contains method Null safety

bool contains(
  1. num x,
  2. num y
)

Implementation

bool contains(num x, num y) {
  final dx = this.x - x;
  final dy = this.y - y;
  return dx * dx + dy * dy < radius * radius;
}