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,10 +132,7 @@ class _DanmakuBlockPageState extends State<DanmakuBlockPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: TabBar(
|
title: TabBar(controller: _danmakuBlockController.tabController, tabs: [
|
||||||
controller: _danmakuBlockController.tabController,
|
|
||||||
dividerColor: Colors.transparent,
|
|
||||||
tabs: [
|
|
||||||
for (var i = 0; i < ruleLabels.length; i++)
|
for (var i = 0; i < ruleLabels.length; i++)
|
||||||
Obx(() => Tab(
|
Obx(() => Tab(
|
||||||
text:
|
text:
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
controller: _emotePanelController.tabController,
|
controller: _emotePanelController.tabController,
|
||||||
padding: const EdgeInsets.only(right: 60),
|
padding: const EdgeInsets.only(right: 60),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
dividerHeight: 0,
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
tabs: (loadingState.response as List<Packages>)
|
tabs: (loadingState.response as List<Packages>)
|
||||||
.map(
|
.map(
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class _HomePageState extends State<HomePage>
|
|||||||
],
|
],
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
dividerHeight: 0,
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
splashBorderRadius: BorderRadius.circular(10),
|
splashBorderRadius: BorderRadius.circular(10),
|
||||||
tabAlignment: TabAlignment.center,
|
tabAlignment: TabAlignment.center,
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ class _SearchResultPageState extends State<SearchResultPage>
|
|||||||
labelColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
labelColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
labelStyle: const TextStyle(fontSize: 13),
|
labelStyle: const TextStyle(fontSize: 13),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
dividerHeight: 0,
|
||||||
unselectedLabelColor: Theme.of(context).colorScheme.outline,
|
unselectedLabelColor: Theme.of(context).colorScheme.outline,
|
||||||
tabAlignment: TabAlignment.start,
|
tabAlignment: TabAlignment.start,
|
||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
|
|||||||
@@ -1272,14 +1272,16 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
labelColor: needIndicator.not || tabs.length == 1
|
labelColor: needIndicator.not || tabs.length == 1
|
||||||
? Theme.of(context).colorScheme.onSurface
|
? Theme.of(context).colorScheme.onSurface
|
||||||
: null,
|
: null,
|
||||||
indicatorColor:
|
indicator: needIndicator.not || tabs.length == 1
|
||||||
needIndicator.not || tabs.length == 1 ? Colors.transparent : null,
|
? const BoxDecoration()
|
||||||
|
: null,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
controller: videoDetailController.tabCtr,
|
controller: videoDetailController.tabCtr,
|
||||||
labelStyle: const TextStyle(fontSize: 13),
|
labelStyle: const TextStyle(fontSize: 13),
|
||||||
labelPadding:
|
labelPadding:
|
||||||
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
|
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
dividerHeight: 0,
|
||||||
onTap: (value) {
|
onTap: (value) {
|
||||||
void animToTop() {
|
void animToTop() {
|
||||||
String text = tabs[value];
|
String text = tabs[value];
|
||||||
|
|||||||
@@ -1565,14 +1565,16 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
labelColor: needIndicator.not || tabs.length == 1
|
labelColor: needIndicator.not || tabs.length == 1
|
||||||
? Theme.of(context).colorScheme.onSurface
|
? Theme.of(context).colorScheme.onSurface
|
||||||
: null,
|
: null,
|
||||||
indicatorColor:
|
indicator: needIndicator.not || tabs.length == 1
|
||||||
needIndicator.not || tabs.length == 1 ? Colors.transparent : null,
|
? const BoxDecoration()
|
||||||
|
: null,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
controller: videoDetailController.tabCtr,
|
controller: videoDetailController.tabCtr,
|
||||||
labelStyle: const TextStyle(fontSize: 13),
|
labelStyle: const TextStyle(fontSize: 13),
|
||||||
labelPadding:
|
labelPadding:
|
||||||
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
|
const EdgeInsets.symmetric(horizontal: 10.0), // 设置每个标签的宽度
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
|
dividerHeight: 0,
|
||||||
onTap: (value) {
|
onTap: (value) {
|
||||||
void animToTop() {
|
void animToTop() {
|
||||||
if (onTap != null) {
|
if (onTap != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user