Dart 使用TabBarView放置另一个小部件
我的appbar底部有一个TabBar,如下所示:Dart 使用TabBarView放置另一个小部件,dart,flutter,Dart,Flutter,我的appbar底部有一个TabBar,如下所示: appBar: new AppBar( bottom: TabBar( labelColor: Colors.black, indicatorColor: Color(0xff2CB57D), tabs: [ Tab( te
appBar: new AppBar(
bottom:
TabBar(
labelColor: Colors.black,
indicatorColor: Color(0xff2CB57D),
tabs: [
Tab(
text: uiLabels['tab1'][globals.currentLang],
),
Tab(text: uiLabels['tab2'][globals.currentLang]),
],
),
body: TabBarView(
children: [
PollsListPage(),
PollsListPage(),
],
),
然后在身体里,像这样:
appBar: new AppBar(
bottom:
TabBar(
labelColor: Colors.black,
indicatorColor: Color(0xff2CB57D),
tabs: [
Tab(
text: uiLabels['tab1'][globals.currentLang],
),
Tab(text: uiLabels['tab2'][globals.currentLang]),
],
),
body: TabBarView(
children: [
PollsListPage(),
PollsListPage(),
],
),
这很好用。。问题是我想用TabBarView在主体中添加定位小部件
我怎样才能做到这一点?我发现我可以放置一个适用于两者的body widget,然后根据需要对其进行自定义。能否请您更精确、更详细地说明您真正想要实现的目标,以便我们能更好地帮助您?