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
Firstly I wanna let u know that there are 3 ways to set colors in flutter.
So u asked u wanna set color or text in app bar. So it works if u set color in style property of Text method. Let me show you how it works. And also I will show you 3 ways of setting color. It doesn't matter if u use theme property or not because setting color of Text works as diffrent. Thats way I didn't use Theme property in examples.
1th:
Scaffold(
appBar: AppBar(
title: Text("App Name",
style: TextStyle(color: Colors.colorname),);
2th :
Scaffold(
appBar: AppBar(
title: Text("App Name",
style: TextStyle(color: Color(0xffffff),));
3th :
Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
title: Text("App Name",
style: TextStyle(color: Color.fromRGBO(0, 0, 0, 0, 0),));