Reputation: 810
I want the long texts to be clipped and continue from the down line. How can I do this in flutter? I have tried all the features of "textoverflow" but no changes
ListTile(
onTap: () {},
visualDensity: VisualDensity(vertical: 4),
leading: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
child: Text(
"Cari Kodu: ${item.cariKod.toString()}",
),
),
],
),
trailing: Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
"Bakiye: ${item.bakiye.toString()}" +
"${item.dovizIdStr != null ? " ${item.dovizIdStr}" : ""}",
),
],
),
),
Upvotes: 0
Views: 297
Reputation: 101
ConstrainedBox( constraints: BoxConstraints.expand(width: // your Width //),child:// your TextWidget //)
you can try this with ConstrainedBox Widget you have to give the width whatever you want, it will be automatically wrapped the text inside the given width
Upvotes: 1
Reputation: 1508
just wrap your text inside an Expanded. because the Text widget is inside a Row the widget doesn't know how much horizontal space it has.
Upvotes: 1