flutter - 如何删除 TabBarView 不可见填充?
问题描述
如何删除 TabBarView 不可见填充?我将 2 个按钮放入其中,但按钮的 2 个边缘似乎被切断了几个像素。我如何解决它?
DefaultTabController(
length: 2,
initialIndex: _setInitialTab(context),
child: Scaffold(
appBar: TabBar(
// labelPadding: EdgeInsets.all(0),
// indicatorPadding: EdgeInsets.all(0),
labelStyle: TextStyle(fontSize: 17),
indicatorColor: AppSetting.buttonColor1,
unselectedLabelColor: AppSetting.buttonDisabledColor1,
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 2,
tabs: <Tab>[
Tab(text: "Popular"),
Tab(text: "New"),
],
onTap: (value) {
},
),
body: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
_tab(context, Tab.Popular),
_tab(context, Tab.New),
],
)
)
)
解决方案
推荐阅读
- amazon-web-services - AWS Lambda“errorMessage”:任务在 3.00 秒后超时
- php - 从 wordpress 触发 laravel 事件
- python - 在 Python 中读取/打开保存为 .bak 的 MySQL 数据库
- kubernetes - 为什么 Helm 只取范围内地图的最后一个值
- javascript - 动态获取 MapBox 标记坐标
- sql - 如何格式化查询结果以在特定的 json 输出中显示结果
- c# - 在 C# 中从程序和内存中删除 byte[]
- python - 刻度未与 matplotlib 表中的单元格对齐
- typescript - TypeScript 省略和 keyof
- python - 对于这种复杂的场景,我该如何处理大数据?递归 CTE 和 Pandas 不起作用?