Unverified Commit 801a6a7e authored by filaps's avatar filaps Committed by GitHub

Fix SnackBar clipping when it is floating due to FloatingActionButton positioning (#47616)

parent 92a335e4
......@@ -547,9 +547,13 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
if (snackBarSize == Size.zero) {
snackBarSize = layoutChild(_ScaffoldSlot.snackBar, fullWidthConstraints);
}
final double snackBarYOffsetBase = floatingActionButtonRect != null && isSnackBarFloating
? floatingActionButtonRect.top
: contentBottom;
double snackBarYOffsetBase;
if (floatingActionButtonRect.size != Size.zero && isSnackBarFloating)
snackBarYOffsetBase = floatingActionButtonRect.top;
else
snackBarYOffsetBase = contentBottom;
positionChild(_ScaffoldSlot.snackBar, Offset(0.0, snackBarYOffsetBase - snackBarSize.height));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment