Skip to content

Commit 141b7bb

Browse files
home: Add Text label below Icons using Flexible
Introduced Flexible instead of Expandible To make sure Text widget cover only required area not till maxheight of ConstrainedBox.
1 parent e6c3f5c commit 141b7bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/widgets/home.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,16 @@ class _NavigationBarButton extends StatelessWidget {
268268
SizedBox(height: 34,
269269
child: Center(
270270
child: Icon(icon, size: 24, color: color,))),
271+
Flexible(
272+
child: Text(
273+
label,
274+
style: TextStyle(
275+
fontSize: 12,
276+
color: color,
277+
height: 1.0,),
278+
textAlign: TextAlign.center,
279+
maxLines: 2,
280+
overflow: TextOverflow.ellipsis)),
271281
]))));
272282
}
273283
}

0 commit comments

Comments
 (0)