Flutter 如何在颤振中更改CupertinaVigationBar中后退按钮的颜色

Flutter 如何在颤振中更改CupertinaVigationBar中后退按钮的颜色,flutter,flutter-cupertino,Flutter,Flutter Cupertino,我想在我的颤振应用程序中更改后退按钮的颜色 以下是我目前的情况: 我想把颜色从浅蓝色改成白色。我在网上搜索过,但什么也没找到。这是我的代码(注意我的按钮是自动创建的) 非常感谢 示例 actionsforgroundcolor:Colors.white在cupertinanavigationbar 做吧 我决定设置CUPERTINOTEXTMEDATA class MyApp extends StatelessWidget { @override Widget build(Build

我想在我的颤振应用程序中更改后退按钮的颜色

以下是我目前的情况:

我想把颜色从浅蓝色改成白色。我在网上搜索过,但什么也没找到。这是我的代码(注意我的按钮是自动创建的)

非常感谢

示例

actionsforgroundcolor:Colors.white
cupertinanavigationbar

做吧


我决定设置CUPERTINOTEXTMEDATA

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: CupertinoThemeData(
        primaryColor:
            Colors.white, //change color of the BOTTOM navbar icons when selected
        textTheme: CupertinoTextThemeData(
          primaryColor:
              Colors.white, //change color of the TOP navbar icon

感谢Lucas为我指明了正确的方向

谢谢,但这对我不起作用。澄清一下:我希望顶部栏上的蓝色箭头变成白色这是我在文档中读到的:ActionsForGroundColor→ 颜色用于导航栏中前导和尾随小部件的文本和图标的默认颜色。[…]@已弃用(“使用CupertinoTheme和primaryColor传播颜色”),最终输出
操作在
CupertinanoviationBar
中重新组合颜色:Colors.white
?这是为了保留白色箭头我这样做了,但它不会改变箭头的颜色。问题可能是我的导航栏位于Cupertinanobview和Cupertinanobscaffold中吗?这不适用于颤振2.0,Cupertinanobagationbar中的此类参数不适用
return  CupertinoPageScaffold(
      navigationBar: CupertinoNavigationBar(actionsForegroundColor: Colors.white,
        heroTag: 'menupage',
        transitionBetweenRoutes: false,
        middle: Text(
          'Menu Page',
          style: TextStyle(),
        ),
      ), child: Text(''),
    );
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: CupertinoThemeData(
        primaryColor:
            Colors.white, //change color of the BOTTOM navbar icons when selected
        textTheme: CupertinoTextThemeData(
          primaryColor:
              Colors.white, //change color of the TOP navbar icon