clickOffset method
Implementation
Offset clickOffset(double childHeight, double areaHeight) {
Offset offset = clickPosition!.translate(
position.dx - boxSize.width / 2, position.dy - boxSize.height / 2);
/// 底部边界检测
double bottom = offset.dy + childHeight - (areaHeight - gap);
if (bottom > 0) {
offset = offset.translate(0, -bottom);
}
return offset;
}