mod: fav sheet

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-27 13:38:23 +08:00
parent 1d8e469a46
commit 896510f852
4 changed files with 49 additions and 82 deletions

View File

@@ -17,7 +17,6 @@ import 'package:PiliPlus/pages/bangumi/widgets/bangumi_panel.dart';
import 'package:PiliPlus/pages/video/detail/index.dart';
import 'package:PiliPlus/pages/video/detail/introduction/widgets/action_item.dart';
import 'package:PiliPlus/pages/video/detail/introduction/widgets/action_row_item.dart';
import 'package:PiliPlus/pages/video/detail/introduction/widgets/fav_panel.dart';
import 'package:PiliPlus/utils/feed_back.dart';
import '../../../utils/utils.dart';
@@ -185,42 +184,13 @@ class _BangumiInfoState extends State<BangumiInfo>
if (type == 'tap') {
bangumiIntroController.actionFavVideo(type: 'default');
} else {
_showFavBottomSheet();
Utils.showFavBottomSheet(context: context, ctr: bangumiIntroController);
}
} else if (type != 'longPress') {
_showFavBottomSheet();
Utils.showFavBottomSheet(context: context, ctr: bangumiIntroController);
}
}
_showFavBottomSheet() {
showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
transitionAnimationController: AnimationController(
duration: const Duration(milliseconds: 200),
vsync: this,
),
sheetAnimationStyle: AnimationStyle(curve: Curves.ease),
builder: (BuildContext context) {
return DraggableScrollableSheet(
minChildSize: 0,
maxChildSize: 1,
initialChildSize: 0.7,
snap: true,
expand: false,
snapSizes: const [0.7],
builder: (BuildContext context, ScrollController scrollController) {
return FavPanel(
ctr: bangumiIntroController,
scrollController: scrollController,
);
},
);
},
);
}
// 视频介绍
showIntroDetail() {
feedBack();