@@ -91,6 +91,64 @@ void main() {
9191 expect (find.text ('Profile' ), findsOneWidget);
9292 });
9393
94+ testWidgets ('buttonSpacing adds spacing between buttons' ,
95+ (WidgetTester tester) async {
96+ int selectedIndex = 0 ;
97+
98+ await tester.pumpWidget (
99+ MaterialApp (
100+ home: Scaffold (
101+ bottomNavigationBar: ResponsiveNavigationBar (
102+ selectedIndex: selectedIndex,
103+ onTabChange: (index) {
104+ selectedIndex = index;
105+ },
106+ buttonSpacing: 8 ,
107+ navigationBarButtons: const [
108+ NavigationBarButton (text: 'Home' , icon: Icons .home),
109+ NavigationBarButton (text: 'Search' , icon: Icons .search),
110+ NavigationBarButton (text: 'Profile' , icon: Icons .person),
111+ ],
112+ ),
113+ ),
114+ ),
115+ );
116+
117+ // Find all SizedBox widgets
118+ final sizedBoxes = find.byType (SizedBox );
119+ // There should be at least 2 SizedBox widgets for spacing (one between each button)
120+ expect (sizedBoxes, findsWidgets);
121+ });
122+
123+ testWidgets ('padding parameter works on NavigationBarButton' ,
124+ (WidgetTester tester) async {
125+ int selectedIndex = 0 ;
126+
127+ await tester.pumpWidget (
128+ MaterialApp (
129+ home: Scaffold (
130+ bottomNavigationBar: ResponsiveNavigationBar (
131+ selectedIndex: selectedIndex,
132+ onTabChange: (index) {
133+ selectedIndex = index;
134+ },
135+ navigationBarButtons: const [
136+ NavigationBarButton (
137+ text: 'Home' ,
138+ icon: Icons .home,
139+ padding: EdgeInsets .all (20 ),
140+ ),
141+ NavigationBarButton (text: 'Search' , icon: Icons .search),
142+ ],
143+ ),
144+ ),
145+ ),
146+ );
147+
148+ // The widget should build without errors
149+ expect (find.byType (ResponsiveNavigationBar ), findsOneWidget);
150+ });
151+
94152 testWidgets ('ResponsiveNavigationBar accepts buttonBorderRadius parameter' ,
95153 (WidgetTester tester) async {
96154 int selectedIndex = 0 ;
0 commit comments