1. override
bool hitTestSelf(Point position)

Override this method if this render object can be hit even if its children were not hit.

Used by hitTest. If you override hitTest and do not call this function, then you don't need to implement this function.

Source

@override
bool hitTestSelf(Point position) {
  return _painter != null && (_painter.hitTest(position) ?? true);
}