feat: adjust search styling
parent
d131e1263c
commit
6ebdb39760
|
@ -55,8 +55,11 @@ class _SearchFoodComponentState extends State<SearchedFoodComponent> {
|
|||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
decoration:
|
||||
const BoxDecoration(color: Color.fromARGB(234, 234, 123, 5)),
|
||||
margin: const EdgeInsets.only(top:8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.lightGreen,
|
||||
borderRadius: BorderRadius.circular(5), // Rounded corners with 5px radius
|
||||
),
|
||||
child: WrapSuper(
|
||||
spacing: 32,
|
||||
wrapType: WrapType.balanced,
|
||||
|
@ -66,31 +69,31 @@ class _SearchFoodComponentState extends State<SearchedFoodComponent> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.6,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Text(
|
||||
widget.food.name,
|
||||
maxLines: 1,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20.0),
|
||||
fontSize: 20.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.6,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Text(
|
||||
"${widget.food.fatg} 100g "
|
||||
"${widget.food.calories} 100g "
|
||||
"${widget.food.carbohydrateg.toString()} 100g",
|
||||
"${widget.food.calories} kcal/100g",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: false,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20.0),
|
||||
fontSize: 20.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -105,13 +108,19 @@ class _SearchFoodComponentState extends State<SearchedFoodComponent> {
|
|||
shadowColor: Colors.greenAccent,
|
||||
elevation: 3,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(32.0)),
|
||||
maximumSize: Size(
|
||||
MediaQuery.of(context).size.width * 0.2, 36), //////// HERE
|
||||
borderRadius: BorderRadius.circular(32.0),
|
||||
),
|
||||
),
|
||||
child: const Text(
|
||||
'+',
|
||||
style: TextStyle(
|
||||
fontSize: 25
|
||||
),
|
||||
),
|
||||
),
|
||||
child: const Text('+'),
|
||||
)
|
||||
],
|
||||
));
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue