How to solve "A RenderFlex overflowed by 143 pixels on the right." error in text?
Just Wrap you - Card
with -Flexible
Widget.
Row(
children: <Widget>[
Flexible(
child: Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Item name mmmasdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaammmmmm"),
SizedBox(height: 15.0,),
Text(
"Discount mmmmmmmm",
),
SizedBox(height: 5.0,),
Text(
"Price ,mmmmmmmmmdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfdgfmmmmmmmmm",
)
],
),
),
),
],
),
You can use Wrap
instead of Column
.
For ex..
new Wrap(
spacing: 5.0,
runSpacing: 5.0,
direction: Axis.vertical, // main axis (rows or columns)
children: <Widget>[
TitleText(text: "Item name mmmmmmmmm $index"),
Body1Text(text: "Discount mmmmmmmm",color: Colors.red,),
SubHeadText(text: "Price ,mmmmmmmmmmmmmmmmmm",color: Colors.red,)
],
)