mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 收藏夹横屏适配、视频条数修正、界面微调
This commit is contained in:
@@ -9,6 +9,8 @@ import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
||||
import 'package:PiliPalaX/common/widgets/no_data.dart';
|
||||
import 'package:PiliPalaX/pages/fav_detail/index.dart';
|
||||
|
||||
import '../../common/constants.dart';
|
||||
import '../../utils/grid.dart';
|
||||
import 'widget/fav_video_card.dart';
|
||||
|
||||
class FavDetailPage extends StatefulWidget {
|
||||
@@ -63,7 +65,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
controller: _controller,
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
expandedHeight: 260 - MediaQuery.of(context).padding.top,
|
||||
expandedHeight: 220 - MediaQuery.of(context).padding.top,
|
||||
pinned: true,
|
||||
titleSpacing: 0,
|
||||
title: StreamBuilder(
|
||||
@@ -109,21 +111,21 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
],
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border(
|
||||
// bottom: BorderSide(
|
||||
// color: Theme.of(context).dividerColor.withOpacity(0.2),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
padding: EdgeInsets.only(
|
||||
top: kTextTabBarHeight +
|
||||
MediaQuery.of(context).padding.top +
|
||||
30,
|
||||
left: 20,
|
||||
10,
|
||||
left: 14,
|
||||
right: 20),
|
||||
child: SizedBox(
|
||||
height: 200,
|
||||
height: 110,
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -161,31 +163,42 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
.labelSmall!
|
||||
.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 8, left: 14),
|
||||
child: Obx(
|
||||
() => Text(
|
||||
'共${_favDetailController.favList.length}条视频',
|
||||
const Spacer(),
|
||||
Text(
|
||||
'共${_favDetailController.item!.mediaCount!}条视频',
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
letterSpacing: 1),
|
||||
fontSize: Theme.of(context)
|
||||
.textTheme
|
||||
.labelSmall!
|
||||
.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// SliverToBoxAdapter(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 8, left: 14),
|
||||
// child: Obx(
|
||||
// () => Text(
|
||||
// '共${_favDetailController.favList.length}条视频',
|
||||
// style: TextStyle(
|
||||
// fontSize:
|
||||
// Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||
// color: Theme.of(context).colorScheme.outline,
|
||||
// letterSpacing: 1),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
FutureBuilder(
|
||||
future: _futureBuilderFuture,
|
||||
builder: (context, snapshot) {
|
||||
@@ -199,7 +212,18 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
return Obx(
|
||||
() => favList.isEmpty
|
||||
? const SliverToBoxAdapter(child: SizedBox())
|
||||
: SliverList(
|
||||
: SliverGrid(
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
mainAxisSpacing: StyleString.cardSpace,
|
||||
crossAxisSpacing: StyleString.safeSpace,
|
||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||
mainAxisExtent: Grid.calculateActualWidth(
|
||||
context,
|
||||
Grid.maxRowWidth * 2,
|
||||
StyleString.safeSpace) /
|
||||
1.9 /
|
||||
StyleString.aspectRatio),
|
||||
delegate:
|
||||
SliverChildBuilderDelegate((context, index) {
|
||||
return FavVideoCardH(
|
||||
|
||||
Reference in New Issue
Block a user