File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
packages/flutter/test/material Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -3092,6 +3092,29 @@ void main() {
3092
3092
expect (find.byKey (key1), findsOneWidget);
3093
3093
expect (find.byKey (key2), findsOneWidget);
3094
3094
});
3095
+
3096
+ testWidgets ('BottomNavigationBar and BottomNavigationBarItem render at zero size' , (
3097
+ WidgetTester tester,
3098
+ ) async {
3099
+ await tester.pumpWidget (
3100
+ MaterialApp (
3101
+ home: Center (
3102
+ child: SizedBox .shrink (
3103
+ child: Scaffold (
3104
+ bottomNavigationBar: BottomNavigationBar (
3105
+ items: const < BottomNavigationBarItem > [
3106
+ BottomNavigationBarItem (icon: Icon (Icons .favorite_border), label: 'X' ),
3107
+ BottomNavigationBarItem (icon: Icon (Icons .access_alarm), label: 'Y' ),
3108
+ ],
3109
+ ),
3110
+ ),
3111
+ ),
3112
+ ),
3113
+ ),
3114
+ );
3115
+ final Finder xText = find.text ('X' );
3116
+ expect (tester.getSize (xText).isEmpty, isTrue);
3117
+ });
3095
3118
}
3096
3119
3097
3120
Widget boilerplate ({
You can’t perform that action at this time.
0 commit comments