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 i
I will write what the change in the property of ThemeData affects.
The content written here is a way that does not affect other widgets as much as possible.
If you want to change the color of appbar's title,
primaryTextTheme: TextTheme(
title: TextStyle(
color: Colors.white
)
),
If you want to change the icon color of the appbar,
primaryIconTheme: const IconThemeData.fallback().copyWith(
color: Colors.white,
),
If you want to change icon color of FAB.
accentIconTheme: const IconThemeData.fallback().copyWith(
color: Colors.white,
),
In addition, when you want to change the color of FAB.
It is impossible only by the property of ThemeData.
So you need to specify it directly. However, it would be better to use Theme.of(context).
floatingActionButton: FloatingActionButton(
backgroundColor: Theme.of(context).primaryColor,