mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
feat: slide dismiss tabbarview
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/common/widgets/page/tabs.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/bangumi/info.dart';
|
||||
@@ -6,7 +7,7 @@ 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';
|
||||
import 'package:flutter/material.dart' hide TabBarView;
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class IntroDetail extends CommonCollapseSlidePage {
|
||||
@@ -35,46 +36,39 @@ class _IntroDetailState extends CommonCollapseSlidePageState<IntroDetail> {
|
||||
|
||||
@override
|
||||
Widget buildPage(ThemeData theme) {
|
||||
return Material(
|
||||
color: theme.colorScheme.surface,
|
||||
child: Column(
|
||||
return CustomTabBarView(
|
||||
controller: _tabController,
|
||||
physics: const CustomTabBarViewScrollPhysics(),
|
||||
bgColor: theme.colorScheme.surface,
|
||||
header: Row(
|
||||
children: [
|
||||
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: tabBarView(
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
buildList(theme),
|
||||
PgcReviewPage(
|
||||
name: widget.bangumiDetail.title!,
|
||||
mediaId: widget.bangumiDetail.mediaId,
|
||||
),
|
||||
],
|
||||
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),
|
||||
],
|
||||
),
|
||||
children: [
|
||||
buildList(theme),
|
||||
PgcReviewPage(
|
||||
name: widget.bangumiDetail.title!,
|
||||
mediaId: widget.bangumiDetail.mediaId,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user