includeLocalPosition method
Implementation
bool includeLocalPosition(Offset otherOffset) {
final RenderBox? renderBox = currentContext?.findRenderObject() as RenderBox?;
if (renderBox == null) {
return false;
}
// final Offset? offset = renderBox?.localToGlobal(Offset.zero);
final size = renderBox.size;
final Offset offset = renderBox.localToGlobal(Offset.zero);
if (otherOffset.dx > offset.dx &&
otherOffset.dx < offset.dx + size.width &&
otherOffset.dy > offset.dy &&
otherOffset.dy < offset.dy + size.height) {
return true;
}
return false;
}