boundForY function
Which Y-axis bound the rect is currently sitting on. If centered at
base, delta's sign decides (positive → bottom).
Implementation
DragBound boundForY({
required double delta,
required Rect currentRect,
required Rect baseRect,
}) {
if (currentRect.center.dy > baseRect.center.dy) return .bottom;
if (currentRect.center.dy < baseRect.center.dy) return .top;
return delta >= 0 ? .bottom : .top;
}