首先我们得状态栏透明,new AppBar(
backgroundColor: Colors.transparent,
elevation: 0, // 阴影0,这个很重要
),
算了,直接上代码吧,很简单的代码。
Scaffold(
body: new Stack(
children: <Widget>[
new AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
),
new Positioned(
child: new Container(
height: FHAdapt.px(300),
decoration: new BoxDecoration(
image: new DecorationImage(
image: AssetImage('assets/images/team_header_bg.png'),
fit: BoxFit.fill
),
),
),
),
],
),
);