getLimitedCenterYInside method

double getLimitedCenterYInside(
  1. Rect container
)

Implementation

double getLimitedCenterYInside(Rect container) {
  if (height > container.height) {
    return center.dy + min(0, container.top - top) + max(0, container.bottom - bottom);
  } else {
    return container.center.dy;
  }
}