我想在Column
内添加标签栏。目前,我是这样添加的。 一切正常。这样是添加TabBar的唯一方法吗? (我在此页面上添加了两个脚手架):在Column
内使用制表键的最佳方法是什么?
child: Scaffold(
body: Container(
color: Palette.backgroundGrey,
child: Column(
children: <Widget>[
Stack(
...
),
Padding(
...
),
Flexible(
flex: 9,
child: DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
leading: Container(), //remove back button
backgroundColor:Palette.backgroundGrey, //added same color on main scaffold
elevation: 0, // remove shadow
flexibleSpace: TabBar(tabs: [ //tab bar added to flexibleSpace instead of title
Tab(text: 'Rating & Reviews'),
Tab(text: 'Business Details'),
Tab(text: 'Offers')
]),
),
body: TabBarView(children: [
Text('rating'),
Text('business'),
Text('offers')
])
)
),
)
],
),
)),