flutter
默认情况下,当我们在系统状态下使用该AppBar
显示时,例如:
appBar: AppBar(
title: Text(
Strings.appName,
style: appBarTextStyle,
),
automaticallyImplyLeading: true,
leading: Builder(
builder: (context) => IconButton(
icon: Icon(Icons.menu),
onPressed: () => Scaffold.of(context).openDrawer(),
),
),
),
现在,在我的应用程序中,我没有AppBar
,我想Container
在这个系统状态下拥有,但我不能这样做
我的实现:
child: Scaffold(
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {},
),
floatingActionButtonLocation:
FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: new BottomAppBar(
shape: CircularNotchedRectangle(),
child: Container(
height: 50.0,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 40.0),
child: Row(
...
),
),
),
),
drawer: AppDrawer(),
body: Column(
children: <Widget>[
Container(
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.indigo,
)
]),
height: 70.0,
child: Row(
children: <Widget>[
Center(child: Text("TOOLBAR", style: defaultAppBarTextStyle)),
],
),
),
Expanded(child: _fragments[_currentIndex]),
],
),