mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: tabbar
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -132,15 +132,12 @@ class _DanmakuBlockPageState extends State<DanmakuBlockPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
title: TabBar(
|
||||
controller: _danmakuBlockController.tabController,
|
||||
dividerColor: Colors.transparent,
|
||||
tabs: [
|
||||
for (var i = 0; i < ruleLabels.length; i++)
|
||||
Obx(() => Tab(
|
||||
text:
|
||||
'${ruleLabels[i]}(${_danmakuBlockController.ruleTypes[i]!.length})')),
|
||||
]),
|
||||
title: TabBar(controller: _danmakuBlockController.tabController, tabs: [
|
||||
for (var i = 0; i < ruleLabels.length; i++)
|
||||
Obx(() => Tab(
|
||||
text:
|
||||
'${ruleLabels[i]}(${_danmakuBlockController.ruleTypes[i]!.length})')),
|
||||
]),
|
||||
),
|
||||
body: tabBarView(
|
||||
controller: _danmakuBlockController.tabController,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user