I am able to set the background color of AppBar
to Colors.amber
. This automatically sets the text color to Black. I am aware of the accessibility issues that may arise but anyways I want the text color to be White.
I am still able to set the text color from the AppBar
but I would like to set it universally.
Here's the theme I'm using for my app.
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.amber,
textTheme: Theme.of(context).textTheme.apply(
bodyColor: Colors.white,
displayColor: Colors.white,
),
),
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…