【发布时间】:2020-03-25 09:47:57
【问题描述】:
在使用 main 方法中的这些代码行更改底部导航栏颜色时:
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: Colors.white,
statusBarColor: Colors.transparent,
));
效果很好,但在主页内使用 SilverAppBar 时,底部导航栏颜色会在一段时间后恢复为黑色:
body: CustomScrollView(
slivers: <Widget>[
SliverAppBar(
expandedHeight: 300,
floating: false,
pinned: true,
snap: false,
backgroundColor: Colors.white,
flexibleSpace: FlexibleSpaceBar(),
),
SliverList(
delegate: SliverChildListDelegate(<Widget>[
]),
)
],
),
当改变expandedHeight: 250的值时底部navBar的颜色不会改变,
所以问题出在expandedHeight value 里面,那么为什么以及如何解决这个问题。
【问题讨论】: