Skip to content

Commit 484cdec

Browse files
home: Replace SizeBox with ConstrainedBox in bottom nav bar
This allows the height of bottom nav bar to dyanmically change on the basis of system font size, maxHeight has been set after calibration.
1 parent 22e7f3d commit 484cdec

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

lib/widgets/home.dart

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,15 @@ class _HomePageState extends State<HomePage> {
142142
border: Border(top: BorderSide(color: designVariables.borderBar)),
143143
color: designVariables.bgBotBar),
144144
child: SafeArea(
145-
child: SizedBox(height: 48,
146-
child: Center(
147-
child: ConstrainedBox(
148-
// TODO(design): determine a suitable max width for bottom nav bar
149-
constraints: const BoxConstraints(maxWidth: 600),
150-
child: Row(
151-
crossAxisAlignment: CrossAxisAlignment.stretch,
152-
children: [
153-
for (final navigationBarButton in navigationBarButtons)
154-
Expanded(child: navigationBarButton),
155-
])))))));
145+
child: ConstrainedBox(
146+
// TODO(design): determine a suitable max width for bottom nav bar
147+
constraints: const BoxConstraints(maxWidth: 600, minHeight: 48, maxHeight: 85),
148+
child: Row(
149+
crossAxisAlignment: CrossAxisAlignment.start,
150+
children: [
151+
for (final navigationBarButton in navigationBarButtons)
152+
Expanded(child: navigationBarButton),
153+
])))));
156154
}
157155
}
158156

0 commit comments

Comments
 (0)