I can't change my AppBar title text color using AppBar titleTextStyle. I know I can set the AppBar title style in some ways like using style in textWidget or set the textTheme in AppBar, but I just wanna know why it cannot be changed by setting titleTextStyle.
The code is below. AppBar title is still white though setting the titleTextStyle and the foregroundColor.
class MyStatelessWidget extends StatelessWidget { const MyStatelessWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( foregroundColor: Colors.black, titleTextStyle: TextStyle(color: Colors.black), title: const Text('AppBar Color'),), body: const Center( child: Text('sample'), ), ); } }
title, it doesn't compile, could be why your change isn't taking effect