mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 18:46:53 +08:00
feat: pgc review
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/bangumi/info.dart';
|
||||
import 'package:PiliPlus/pages/common/common_collapse_slide_page.dart';
|
||||
import 'package:PiliPlus/pages/pgc_review/view.dart';
|
||||
import 'package:PiliPlus/pages/search/widgets/search_text.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -13,6 +16,7 @@ class IntroDetail extends CommonCollapseSlidePage {
|
||||
const IntroDetail({
|
||||
super.key,
|
||||
required this.bangumiDetail,
|
||||
super.enableSlide = false,
|
||||
this.videoTags,
|
||||
});
|
||||
|
||||
@@ -21,32 +25,54 @@ class IntroDetail extends CommonCollapseSlidePage {
|
||||
}
|
||||
|
||||
class _IntroDetailState extends CommonCollapseSlidePageState<IntroDetail> {
|
||||
late final _tabController = TabController(length: 2, vsync: this);
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget buildPage(ThemeData theme) {
|
||||
return Material(
|
||||
color: theme.colorScheme.surface,
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: Get.back,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
height: 35,
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.onSecondaryContainer
|
||||
.withValues(alpha: 0.5),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(3))),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
dividerHeight: 0,
|
||||
isScrollable: true,
|
||||
tabAlignment: TabAlignment.start,
|
||||
dividerColor: Colors.transparent,
|
||||
tabs: const [Tab(text: '详情'), Tab(text: '点评')],
|
||||
),
|
||||
),
|
||||
),
|
||||
iconButton(
|
||||
context: context,
|
||||
icon: Icons.clear,
|
||||
onPressed: Get.back,
|
||||
iconSize: 22,
|
||||
bgColor: Colors.transparent,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: enableSlide ? slideList(theme) : buildList(theme),
|
||||
)
|
||||
child: tabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
buildList(theme),
|
||||
PgcReviewPage(
|
||||
name: widget.bangumiDetail.title!,
|
||||
mediaId: widget.bangumiDetail.mediaId,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -64,6 +90,7 @@ class _IntroDetailState extends CommonCollapseSlidePageState<IntroDetail> {
|
||||
padding: EdgeInsets.only(
|
||||
left: 14,
|
||||
right: 14,
|
||||
top: 14,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
),
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user