How to change ExpensionTile text color on active?
This is the ExpensionTile I'm trying to change, as you can see the current color is purple.
This is the code:
ExpansionTile(
title: Text('Current Version',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15
),),
children: <Widget>[
ListTile(
title: Text(
'Version 0.1',
style: TextStyle(
fontSize: 14
),
)
),
],
),
CodePudding user response:
To set change the text color of the ExpansionTile()
, you can use the textColor
property:
The color of the tile's titles when the sublist is expanded.
Usage:
textColor: Colors.green
In your example:
ExpansionTile(
textColor: Colors.green,
title: Text('Current Version',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15
),),
children: <Widget>[
ListTile(
title: Text(
'Version 0.1',
style: TextStyle(
fontSize: 14
),
)
),
],
);