【发布时间】:2018-10-31 19:20:16
【问题描述】:
在我的 Flutter 应用中,我有这个 AppBar
Widget setAppBar(){
return new AppBar(
title: addAppBarTextWidget('Explore'),
elevation: 0.0,
leading: addLeadingIcon(),
actions: <Widget>[
addAppBarActionWidget(Constant.iconNotification, 22.0, 16.0, 8.0),
addAppBarActionWidget(Constant.iconProfile, 30.0, 30.0, 15.0)
],
);
}
Widget addLeadingIcon(){
return new Container(
height: 25.0,
width: 25.0,
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
margin: const EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
child: new Stack(
alignment: AlignmentDirectional.center,
children: <Widget>[
new Image.asset(
Constant.iconNotification,
width: 25.0,
height: 25.0,
),
new FlatButton(
onPressed: (){
onLeadingShowCategoryClick();
}
)
],
),
);
}
看起来像:
正如您在 AppBar 上看到的,周围有一些额外的填充 领先的图标。我怎样才能删除这个额外的填充。
【问题讨论】:
-
拯救了我的一天,正在查看许多文章
标签: dart flutter flutter-layout