opt: tabbar

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-05 00:04:38 +08:00
parent 7667e73d9d
commit 9c21f03df8
6 changed files with 17 additions and 13 deletions

View File

@@ -132,10 +132,7 @@ class _DanmakuBlockPageState extends State<DanmakuBlockPage> {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: TabBar(
controller: _danmakuBlockController.tabController,
dividerColor: Colors.transparent,
tabs: [
title: TabBar(controller: _danmakuBlockController.tabController, tabs: [
for (var i = 0; i < ruleLabels.length; i++)
Obx(() => Tab(
text:

View File

@@ -98,6 +98,7 @@ class _EmotePanelState extends State<EmotePanel>
controller: _emotePanelController.tabController,
padding: const EdgeInsets.only(right: 60),
dividerColor: Colors.transparent,
dividerHeight: 0,
isScrollable: true,
tabs: (loadingState.response as List<Packages>)
.map(

View File

@@ -57,6 +57,7 @@ class _HomePageState extends State<HomePage>
],
isScrollable: true,
dividerColor: Colors.transparent,
dividerHeight: 0,
enableFeedback: true,
splashBorderRadius: BorderRadius.circular(10),
tabAlignment: TabAlignment.center,

View File

@@ -111,6 +111,7 @@ class _SearchResultPageState extends State<SearchResultPage>
labelColor: Theme.of(context).colorScheme.onSecondaryContainer,
labelStyle: const TextStyle(fontSize: 13),
dividerColor: Colors.transparent,
dividerHeight: 0,
unselectedLabelColor: Theme.of(context).colorScheme.outline,
tabAlignment: TabAlignment.start,
onTap: (index) {

View File

@@ -1272,14 +1272,16 @@ class _VideoDetailPageState extends State<VideoDetailPage>
labelColor: needIndicator.not || tabs.length == 1
? Theme.of(context).colorScheme.onSurface
: null,
indicatorColor:
needIndicator.not || tabs.length == 1 ? Colors.transparent : null,
indicator: needIndicator.not || tabs.length == 1
? const BoxDecoration()
: null,
padding: EdgeInsets.zero,
controller: videoDetailController.tabCtr,
labelStyle: const TextStyle(fontSize: 13),
labelPadding:
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
dividerColor: Colors.transparent,
dividerHeight: 0,
onTap: (value) {
void animToTop() {
String text = tabs[value];

View File

@@ -1565,14 +1565,16 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
labelColor: needIndicator.not || tabs.length == 1
? Theme.of(context).colorScheme.onSurface
: null,
indicatorColor:
needIndicator.not || tabs.length == 1 ? Colors.transparent : null,
indicator: needIndicator.not || tabs.length == 1
? const BoxDecoration()
: null,
padding: EdgeInsets.zero,
controller: videoDetailController.tabCtr,
labelStyle: const TextStyle(fontSize: 13),
labelPadding:
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
dividerColor: Colors.transparent,
dividerHeight: 0,
onTap: (value) {
void animToTop() {
if (onTap != null) {