在Tabbar中设置tab选中与未选中样式
child: new TabBar(
controller: tabController,
labelColor: Color.fromRGBO(102, 68, 204, 1.0), // tab选中标签色
unselectedLabelColor: Color.fromRGBO(197, 198, 218, 1.0), // tab未选中标签色
indicator: BoxDecoration(),
tabs: _navigationViews
.map((NavigationIconView navigationView) => navigationView.item)
.toList(),
),
tabs中的icon不能使用IconTheme设置样式,会导致样式冲突,直接用Icon
icon: const Icon(StudyInIcons.index),
网友评论