【问题标题】:place another widgets with TabBarView用 TabBarView 放置另一个小部件
【发布时间】:2023-03-27 02:50:01
【问题描述】:

我的应用栏底部有一个 TabBar,如下所示:

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 在正文中添加定位小部件..

我该怎么做?

【问题讨论】:

  • 能否请您更精确和详细一点,以便我们更好地帮助您?

标签: dart flutter


【解决方案1】:

我发现我可以放置一个适用于两者的 body 小部件,然后根据需要对其进行自定义 ..

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-23
    • 2021-12-01
    • 2011-01-18
    • 2019-01-30
    • 2015-03-05
    • 1970-01-01
    • 2021-08-28
    • 1970-01-01
    相关资源
    最近更新 更多