当我不使用isScrollable:True时,它工作正常,没有任何问题,但当我使用它时,左侧有一个空白,如图所示.
如果你向右滚动,这是正常的.
有什么问题吗?我怎么才能解决这个问题呢?
tabBar() {
return DefaultTabController(
length: 6,
animationDuration: Duration.zero,
child: TabBar(
isScrollable: true,
padding: const EdgeInsets.symmetric(vertical: 10),
unselectedLabelStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
),
labelPadding: const EdgeInsets.symmetric(horizontal: 10),
labelStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
color: Color(0xFFffffff),
),
indicatorSize: TabBarIndicatorSize.label,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: const Color(0xFF000000),
),
tabs: [
.
.
.