Update home_screen.dart

fix clipped text on categories selector
This commit is contained in:
Ariz Armeidi
2021-07-17 14:32:43 +07:00
parent 8dd8b4d034
commit f6d099d45c

View File

@@ -29,23 +29,25 @@ class _HomeScreenState extends State<HomeScreen> {
getData(category);
});
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 5),
padding: EdgeInsets.symmetric(horizontal: 25, vertical: 2.5),
decoration: BoxDecoration(
color: _selectedIndex == myIndex ? Colors.white : Colors.orange,
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.orange,
width: .8,
child: FittedBox(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 5),
padding: EdgeInsets.symmetric(horizontal: 25, vertical: 2.5),
decoration: BoxDecoration(
color: _selectedIndex == myIndex ? Colors.white : Colors.orange,
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.orange,
width: .8,
),
),
),
child: Text(
name,
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: _selectedIndex == myIndex ? Colors.orange : Colors.white,
child: Text(
name,
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: _selectedIndex == myIndex ? Colors.orange : Colors.white,
),
),
),
),