This is my code, I don't understand, how to change text color for theme
void main() => runApp(new MaterialApp(
title: 'Характеристика',
home: new CharacteristList(),
theme: new ThemeData(
primaryColor: Colors.lightBlue,
accentColor: Colors.lightBlueAccent,
),
)
Steps to change theme text color in Flutter You can change theme text color in Flutter, by defining the TextTheme (inside MaterialApp) and then adding headings type. For example, headline1 , headline2 , BodyText1 , and so on. After that, you can assign the TextStyle widget with the color of your choice.
Open your device's Settings app . Text and display. Select Color correction. Turn on Use color correction.
You can use textTheme:
theme: new ThemeData(
primaryColor: Colors.blue,
textTheme: Theme.of(context).textTheme.apply(
bodyColor: Colors.blue,
displayColor: Colors.blue,
))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With