Clamp Scaffold's max body height when extendBody is true (#37254)

This commit is contained in:
Shi-Hao Hong
2019-07-31 13:42:55 -07:00
committed by GitHub
parent f3674ccfd7
commit 28dd0fde3b

View File

@@ -432,6 +432,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
if (extendBody) {
bodyMaxHeight += bottomWidgetsHeight;
bodyMaxHeight = bodyMaxHeight.clamp(0.0, looseConstraints.maxHeight - contentTop).toDouble();
assert(bodyMaxHeight <= math.max(0.0, looseConstraints.maxHeight - contentTop));
}