contains method
Returns true when point is inside the region represented by this path.
The implementation performs a quick bounding-rect test first (cheap),
then calls the more expensive path.contains when necessary.
Implementation
bool contains(Offset point) {
// Quick bounding rect check before expensive contains()
if (path.getBounds().contains(point)) {
return path.contains(point);
}
return false;
}