How to change the appBar back button color

前端 未结 9 646
慢半拍i
慢半拍i 2021-01-30 11:54

I cannot figure out how to change the appBar\'s automatic back button to a different color. it\'s under a scaffold and I\'ve tried to research it but I can\'t wrap my head aroun

9条回答
  •  清歌不尽
    2021-01-30 12:40

    To change the leading color for CupertinoPageScaffold

    Theme(
      data: Theme.of(context).copyWith(
        cupertinoOverrideTheme: CupertinoThemeData(
          scaffoldBackgroundColor: Colors.white70,
          primaryColor: Styles.green21D877, // HERE COLOR OF LEADING
        ),
      ),
      child: CupertinoPageScaffold(
        navigationBar: CupertinoNavigationBar(
          brightness: Brightness.light,
          backgroundColor: Colors.white,
          middle: Text('Cupertino App Bar'),
        ),
        child: Container(
          child: Center(
            child: CupertinoActivityIndicator(),
          ),
        ),
      ),
    )
    

提交回复
热议问题