Skip to content

Commit ed0b571

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 da4a8fa commit ed0b571

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
@@ -263,6 +263,16 @@ class _NavigationBarButton extends StatelessWidget {
263263
SizedBox(height: 34,
264264
child: Center(
265265
child: Icon(icon, size: 24, color: color,))),
266+
Flexible(
267+
child: Text(
268+
label,
269+
style: TextStyle(
270+
fontSize: 12,
271+
color: color,
272+
height: 1.0,),
273+
textAlign: TextAlign.center,
274+
maxLines: 2,
275+
overflow: TextOverflow.ellipsis)),
266276
])));
267277
}
268278
}

0 commit comments

Comments
 (0)