Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-02-25 18:02:36 +08:00
parent e707764f84
commit 2bdab71138
14 changed files with 81 additions and 64 deletions

View File

@@ -257,9 +257,7 @@ class _ArticlePageState extends CommonDynPageState<ArticlePage> {
width: maxWidth,
margin: const EdgeInsets.only(bottom: 10),
child: PageView.builder(
physics: const CustomTabBarViewScrollPhysics(
parent: ClampingScrollPhysics(),
),
physics: clampingScrollPhysics,
onPageChanged: (value) =>
controller.topIndex.value = value,
itemCount: length,

View File

@@ -127,7 +127,7 @@ class _DynamicsPageState extends CommonPageState<DynamicsPage>
Widget? leading;
List<Widget>? actions;
Widget child = videoTabBarView(
Widget child = tabBarView(
controller: _dynamicsController.tabController,
children: DynamicsTabType.values
.map((e) => DynamicsTabPage(dynamicsType: e))

View File

@@ -7,6 +7,7 @@ import 'package:PiliPlus/common/widgets/flutter/page/tabs.dart';
import 'package:PiliPlus/common/widgets/image/image_save.dart';
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/common/widgets/keep_alive_wrapper.dart';
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
import 'package:PiliPlus/common/widgets/stat/stat.dart';
import 'package:PiliPlus/http/fav.dart';
import 'package:PiliPlus/http/loading_state.dart';
@@ -235,6 +236,7 @@ class _EpisodePanelState extends State<EpisodePanel>
if (_isMulti) {
return TabBarView<TabBarDragGestureRecognizer>(
controller: _tabController,
physics: clampingScrollPhysics,
horizontalDragGestureRecognizer: () =>
TabBarDragGestureRecognizer(isDxAllowed: isDxAllowed),
children: List.generate(

View File

@@ -136,7 +136,7 @@ class _HistoryPageState extends State<HistoryPage>
child: TabBarView<CustomHorizontalDragGestureRecognizer>(
physics: enableMultiSelect
? const NeverScrollableScrollPhysics()
: const CustomTabBarViewScrollPhysics(),
: clampingScrollPhysics,
controller: _historyController.tabController,
horizontalDragGestureRecognizer:
CustomHorizontalDragGestureRecognizer.new,

View File

@@ -132,7 +132,7 @@ class _LaterPageState extends State<LaterPage>
child: TabBarView<CustomHorizontalDragGestureRecognizer>(
physics: enableMultiSelect
? const NeverScrollableScrollPhysics()
: const CustomTabBarViewScrollPhysics(),
: clampingScrollPhysics,
controller: _tabController,
horizontalDragGestureRecognizer:
CustomHorizontalDragGestureRecognizer.new,

View File

@@ -727,9 +727,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
? PageView<CustomHorizontalDragGestureRecognizer>(
key: pageKey,
controller: _liveRoomController.pageController,
physics: const CustomTabBarViewScrollPhysics(
parent: ClampingScrollPhysics(),
),
physics: clampingScrollPhysics,
onPageChanged: (value) =>
_liveRoomController.pageIndex.value = value,
horizontalDragGestureRecognizer:

View File

@@ -96,7 +96,7 @@ class _IntroDetailState extends State<PgcIntroPanel>
Widget buildList(ThemeData theme) {
return TabBarView<TabBarDragGestureRecognizer>(
controller: _tabController,
physics: const CustomTabBarViewScrollPhysics(),
physics: clampingScrollPhysics,
horizontalDragGestureRecognizer: () =>
TabBarDragGestureRecognizer(isDxAllowed: isDxAllowed),
children: [

View File

@@ -335,9 +335,7 @@ class _PayCoinsPageState extends State<PayCoinsPage>
height: 100,
child: PageView(
key: const PageStorageKey(_PayCoinsPageState),
physics: const CustomTabBarViewScrollPhysics(
parent: ClampingScrollPhysics(),
),
physics: clampingScrollPhysics,
controller: _controller,
onPageChanged: (index) {
_scale();

View File

@@ -863,7 +863,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
children: [
buildTabBar(onTap: videoDetailController.animToTop),
Expanded(
child: videoTabBarView(
child: tabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(
@@ -932,7 +932,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
children: [
buildTabBar(),
Expanded(
child: videoTabBarView(
child: tabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(
@@ -1000,7 +1000,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
children: [
buildTabBar(showIntro: false),
Expanded(
child: videoTabBarView(
child: tabBarView(
controller: videoDetailController.tabCtr,
children: [
if (videoDetailController.showReply)
@@ -1080,7 +1080,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
: showIntro,
),
Expanded(
child: videoTabBarView(
child: tabBarView(
controller: videoDetailController.tabCtr,
children: [
if (videoDetailController.isFileSource)