diff --git a/lib/tools/home/my_home_page.dart b/lib/tools/home/my_home_page.dart index a776542..2710877 100644 --- a/lib/tools/home/my_home_page.dart +++ b/lib/tools/home/my_home_page.dart @@ -117,11 +117,10 @@ class _MyHomePageState extends State 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 with SingleTickerProviderStateM //设置选中时的字体样式,tabs里面的字体样式优先级最高 isScrollable: true, //允许左右滚动 - indicatorWeight: 3.0, + indicatorWeight: 2.0, + dividerHeight: 0, + tabAlignment: TabAlignment.start, //选中下划线的高度,值越大高度越高,默认为2。0 onTap: (int index) { },