Flutter how to use ListTile Threeline
As from the docs:
The value of subtitle, which is optional, will occupy the space allocated for an additional line of text, or two lines if isThreeLine is true.
It basically means the subtitle
of the ListTile
is given more space to have text which is more than one line in length:
By default, the ListTile in flutter can display only 2 lines. The Title and the SubTitle. In case there is a third line of text to be displayed, the isThreeLine is set to true and can allow another line to be present. The subtitle will be taking care of giving the 3rd line of text. It is expected that, if the isThreeLine is set to true, the subtitle should be non-null. Anything after "\n" inside subtitle will come in next line
ListTile(
title: Text("First Line",
style: TextStyle(fontWeight: FontWeight.bold)),
subtitle: Text("Second One Text "\nThis is Line Third Text"),
isThreeLine: true,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
GestureDetector(
child: Icon(Icons.delete,color: Colors.red,),
onTap: () {
},
),
],
),
onTap: (){},
)