contains method

  1. @override
bool contains(
  1. CellOffset position
)
override

Returns true if the givenposition is within this range.

Implementation

@override
bool contains(CellOffset position) {
  final normal = normalized;

  if (!(normal.begin.y <= position.y && position.y <= normal.end.y)) {
    return false;
  }

  return normal.begin.x <= position.x && position.x <= normal.end.x;
}