You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constString message ='Floating SnackBar presented off screen.\n'
1668
+
'A SnackBar with behavior property set to SnackBarBehavior.floating is fully '
1669
+
'or partially off screen because some or all the widgets provided to '
1670
+
'Scaffold.floatingActionButton, Scaffold.persistentFooterButtons and '
1671
+
'Scaffold.bottomNavigationBar take up too much vertical space.\n'
1672
+
'Consider constraining the size of these widgets to allow room for the SnackBar to be visible.';
1673
+
expect(exception.message, message);
1674
+
}
1675
+
1676
+
testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.floatingActionButton', (WidgetTester tester) async {
1677
+
// Regression test for https://github.com/flutter/flutter/issues/84263
1678
+
await tester.pumpWidget(
1679
+
MaterialApp(
1680
+
home:Scaffold(
1681
+
floatingActionButton:Container(),
1682
+
),
1683
+
),
1684
+
);
1685
+
1686
+
openFloatingSnackBar(tester);
1687
+
await tester.pumpAndSettle(); // Have the SnackBar fully animate out.
1688
+
expectSnackBarNotVisibleError(tester);
1689
+
});
1690
+
1691
+
testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.persistentFooterButtons', (WidgetTester tester) async {
1692
+
// Regression test for https://github.com/flutter/flutter/issues/84263
await tester.pumpAndSettle(); // Have the SnackBar fully animate out.
1703
+
expectSnackBarNotVisibleError(tester);
1704
+
});
1705
+
1706
+
testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.bottomNavigationBar', (WidgetTester tester) async {
1707
+
// Regression test for https://github.com/flutter/flutter/issues/84263
1708
+
await tester.pumpWidget(
1709
+
constMaterialApp(
1710
+
home:Scaffold(
1711
+
bottomNavigationBar:SizedBox(height:1000),
1712
+
),
1713
+
),
1714
+
);
1715
+
1716
+
openFloatingSnackBar(tester);
1717
+
await tester.pumpAndSettle(); // Have the SnackBar fully animate out.
1718
+
expectSnackBarNotVisibleError(tester);
1719
+
});
1720
+
1655
1721
testWidgets(
1656
1722
'SnackBar has correct end padding when it contains an action with fixed behavior',
0 commit comments