我试图找到以下问题的答案:“如何正确编码ThemeData的已贬值的'title'参数? (我正在学习教程)。但是,我在其他主题的一些评论中找到了正确的答案。我将答案留在下面,以供将来参考和轻松查找。
theme: new ThemeData(
primaryTextTheme: TextTheme(
title: TextStyle(
color: Colors.white,
))),
How to change text color of AppBar, icon color of FAB universally using theme?
将“标题”替换为“ headline6”:
theme: new ThemeData(
primaryTextTheme: TextTheme(
headline6: TextStyle(
color: Colors.white,
))),