修改显示

This commit is contained in:
zhangzhan 2024-08-06 21:19:32 +08:00
parent aae82abce5
commit 409aff6a17

View File

@ -117,11 +117,10 @@ class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateM
width: double.infinity,
height: 40,
padding: const EdgeInsets.only(top: 10),
alignment: Alignment.centerLeft,
child: TabBar(
tabs: tabs,
controller: _tabController,
indicator: MyUnderlineTabIndicator(wantWidth: 20),
//indicator: MyUnderlineTabIndicator(wantWidth: 20),
unselectedLabelColor: Color(0xFF9B9B9B),
//tabs里面的字体样式优先级最高
unselectedLabelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.normal),
@ -132,7 +131,9 @@ class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateM
//tabs里面的字体样式优先级最高
isScrollable: true,
//
indicatorWeight: 3.0,
indicatorWeight: 2.0,
dividerHeight: 0,
tabAlignment: TabAlignment.start,
//线20
onTap: (int index) {
},