Gülsen Keskin
Gülsen Keskin

Reputation: 810

how can I show long texts so that they continue from the bottom line

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

enter image description here

enter image description here

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

Answers (2)

Sneha G Sneha
Sneha G Sneha

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

reza
reza

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

Related Questions