How to change the text size of a List Tile Widget?

Viewed 3331

I have been looking for a way to change the text size of my List Tile Widget,

2 Answers

You have to pass the TextStyle as argument to Text widget. Here is the example.

ListTile(
    leading: FlutterLogo(size: 72.0),
    title: Text('Three-line ListTile'),
    subtitle: Text(
         'A sufficiently long subtitle warrants three lines.',
         style: TextStyle(
              fontSize: 20.0,
              color: Colors.red,
              fontWeight: FontWeight.w600,
         ),
    ),
    trailing: Icon(Icons.more_vert),
    isThreeLine: true,
),

from the TextStyle you can change many styles of Text widget like fontWeigth, textBaseLine, letterSpacing etc.

As you didn't added any code. I hope this helps.

Text(
    "Your text",
     style: TextStyle(
      fontSize: 20.0,
      color: Colors.red,
      fontWeight: FontWeight.w600,
    ),
  )
Related