I am adding to my flutter app an AboutDialog.
The main color of the app is black so I changed the background color of the AboutDialog
to black inside ThemeData
thanks to DialogTheme
but the problem is that I don’t know how to change the color of the labels, of the AboutDialog
: applicationName
, applicationVersion
and applicationLegalese
, those labels are grey and it’s hard to read them with the black background.
I tried to modify the colorScheme
in ThemeData
but nothing.
How can I change the label’s color to white for example?
TextButton(
onPressed: () => showDialog<String>(
barrierColor: Colors.black,
context: context,
builder: (BuildContext context) => AboutDialog(
applicationName: '1234',
applicationIcon: Flexible(
child: Image.asset('assets/icon/icon.png',width: 100,height: 100,),),
applicationVersion:'1234',
applicationLegalese:'1234',
)),
child: const Text( textAlign: TextAlign.center,maxLines: 2,
overflow: TextOverflow.ellipsis,'More Info',
style: TextStyle(color: Colors.white),
)),
2
Answers
Thanks to @Hamed for the inspiration, this is what worked for me:
It doesn't work if I add the
theme
inside theAboutDialog
Edit: That setup caused me some visual problem on the Licenses so this is the final code:
Now both
AboutDialog
and Licenses look very good