Tabbar|Tabbar 简单封装
Tabbar自定义记录
PreferredSize _customTabBar() {
return PreferredSize(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: TabBar(
isScrollable: true,
controller: _tabController,
tabs: _tabs.map((e) => Tab(text: e)).toList(),
),
),
IconButton(
icon: Icon(
Icons.menu,
color: Colors.white,
),
onPressed: _editTabs,
),
],
),
preferredSize: Size.fromHeight(44),
);
}
使用
appBar: AppBar(
title: Text('健康咨询'),
bottom: _customTabBar();
),
默认
bottom: TabBar(
isScrollable: true,
controller: _tabController,
tabs: _tabs.map((e) => Tab(text: e)).toList(),
),
推荐阅读
- 2020-04-07vue中Axios的封装和API接口的管理
- 基于|基于 antd 风格的 element-table + pagination 的二次封装
- 科学养胃,别被忽悠,其实真的很简单
- opencv|opencv C++模板匹配的简单实现
- python自定义封装带颜色的logging模块
- 松软可口易消化,无需烤箱超简单,新手麻麻也能轻松成功~
- 简单心理2019春A期+32+张荣
- 《算法》-图[有向图]
- jQuery插件
- android防止连续点击的简单实现(kotlin)