Flutter 如何在flatter中默认显示电池图标、网络图标等
当我打开我的Flitter应用程序时,手机的电池图标和网络图标消失了。这是我的appbar代码:Flutter 如何在flatter中默认显示电池图标、网络图标等,flutter,Flutter,当我打开我的Flitter应用程序时,手机的电池图标和网络图标消失了。这是我的appbar代码: headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return <Widget>[ SliverOverlapAbsorber( handle: NestedScrollView.sliverOverlapAbsorberHandle
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
context,
),
sliver: SliverAppBar(
title: Text(
'Cruise',
style: TextStyle(
color: Theme.of(context).brightness == Brightness.light ? Colors.black : Colors.white,
),
),
pinned: true,
expandedHeight: 10.0,
floating: true,
snap: true,
forceElevated: innerBoxIsScrolled,
actions: [
if (state.currentStoriesType == StoriesType.channels)
IconButton(
onPressed: () => {dispatch(HomeListActionCreator.onJumpAddChannel())},
icon: Icon(Feather.plus),
),
],
)),
];
},
headerSliverBuilder:(BuildContext上下文,bool-innerboxiscrowled){
返回[
银光吸收器(
句柄:NestedScrollView.SliverOverlapperHandleFor(
上下文
),
银条:银条(
标题:正文(
"巡游",,
样式:TextStyle(
颜色:主题.of(上下文).brightness==亮度.light?Colors.black:Colors.white,
),
),
对,,
扩展高度:10.0,
浮动:是的,
是的,
强制提升:内包装箱为羊角形,
行动:[
if(state.currentStoriesType==StoriesType.channels)
图标按钮(
onPressed:()=>{dispatch(HomeListActionCreator.onJumpAddChannel())},
图标:图标(Feather.plus),
),
],
)),
];
},
如何通过defult显示图标?现在图标消失:
使用小部件
SafeArea
它将提供您想要的东西。
将顶部的小部件放入其中。是否尝试用SafeArea()和@Dolphin()将脚手架或身体封闭起来