isWithin method

bool isWithin(
  1. CellOffset position
)

Implementation

bool isWithin(CellOffset position) {
  if (position.y != line) {
    return false;
  }

  if (start != null && position.x < start!) {
    return false;
  }

  if (end != null && position.x > end!) {
    return false;
  }

  return true;
}