Merge branch 'design'
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import 'package:easy_debounce/easy_throttle.dart';
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pilipala/common/skeleton/video_card_h.dart';
|
||||||
import 'package:pilipala/common/widgets/http_error.dart';
|
import 'package:pilipala/common/widgets/http_error.dart';
|
||||||
import 'package:pilipala/pages/fav/index.dart';
|
import 'package:pilipala/pages/fav/index.dart';
|
||||||
import 'package:pilipala/pages/fav/widgets/item.dart';
|
import 'package:pilipala/pages/fav/widgets/item.dart';
|
||||||
@ -93,7 +94,12 @@ class _FavPageState extends State<FavPage> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 骨架屏
|
// 骨架屏
|
||||||
return const Text('请求中');
|
return ListView.builder(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return const VideoCardHSkeleton();
|
||||||
|
},
|
||||||
|
itemCount: 10,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:easy_debounce/easy_throttle.dart';
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pilipala/common/skeleton/video_card_h.dart';
|
||||||
import 'package:pilipala/common/widgets/http_error.dart';
|
import 'package:pilipala/common/widgets/http_error.dart';
|
||||||
import 'package:pilipala/utils/route_push.dart';
|
import 'package:pilipala/utils/route_push.dart';
|
||||||
import 'controller.dart';
|
import 'controller.dart';
|
||||||
@ -87,7 +88,12 @@ class _SubPageState extends State<SubPage> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 骨架屏
|
// 骨架屏
|
||||||
return const Text('请求中');
|
return ListView.builder(
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return const VideoCardHSkeleton();
|
||||||
|
},
|
||||||
|
itemCount: 10,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@ -525,11 +525,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
Scaffold(
|
Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
key: vdCtr.scaffoldKey,
|
key: vdCtr.scaffoldKey,
|
||||||
backgroundColor: Colors.black,
|
|
||||||
appBar: PreferredSize(
|
appBar: PreferredSize(
|
||||||
preferredSize: const Size.fromHeight(0),
|
preferredSize: const Size.fromHeight(0),
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.black,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -559,8 +558,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
}
|
}
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
// 假装使用一个非空变量,避免Obx检测不到而罢工
|
pinned: true,
|
||||||
pinned: vdCtr.autoPlay.value,
|
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
forceElevated: innerBoxIsScrolled,
|
forceElevated: innerBoxIsScrolled,
|
||||||
@ -568,8 +566,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
background: PopScope(
|
background: PopScope(
|
||||||
canPop: plPlayerController?.isFullScreen.value !=
|
canPop:
|
||||||
true,
|
plPlayerController?.isFullScreen.value != true,
|
||||||
onPopInvoked: (bool didPop) {
|
onPopInvoked: (bool didPop) {
|
||||||
if (plPlayerController?.isFullScreen.value ==
|
if (plPlayerController?.isFullScreen.value ==
|
||||||
true) {
|
true) {
|
||||||
@ -581,16 +579,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
verticalScreen();
|
verticalScreen();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: LayoutBuilder(
|
child: Hero(
|
||||||
builder: (BuildContext context,
|
tag: heroTag,
|
||||||
BoxConstraints boxConstraints) {
|
child: Stack(
|
||||||
return Stack(
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (isShowing)
|
if (isShowing) videoPlayerPanel,
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 0),
|
|
||||||
child: videoPlayerPanel,
|
|
||||||
),
|
|
||||||
|
|
||||||
/// 关闭自动播放时 手动播放
|
/// 关闭自动播放时 手动播放
|
||||||
Obx(
|
Obx(
|
||||||
@ -606,9 +599,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
},
|
),
|
||||||
)),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -627,10 +620,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
: pinnedHeaderHeight;
|
: pinnedHeaderHeight;
|
||||||
},
|
},
|
||||||
onlyOneScrollInBody: true,
|
onlyOneScrollInBody: true,
|
||||||
body: ColoredBox(
|
body: Column(
|
||||||
key: Key(heroTag),
|
|
||||||
color: Theme.of(context).colorScheme.background,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
tabbarBuild(),
|
tabbarBuild(),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -646,8 +636,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
VideoIntroPanel(bvid: vdCtr.bvid),
|
VideoIntroPanel(bvid: vdCtr.bvid),
|
||||||
] else if (vdCtr.videoType ==
|
] else if (vdCtr.videoType ==
|
||||||
SearchType.media_bangumi) ...[
|
SearchType.media_bangumi) ...[
|
||||||
Obx(() => BangumiIntroPanel(
|
Obx(() =>
|
||||||
cid: vdCtr.cid.value)),
|
BangumiIntroPanel(cid: vdCtr.cid.value)),
|
||||||
],
|
],
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Divider(
|
child: Divider(
|
||||||
@ -678,7 +668,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
|
||||||
/// 重新进入会刷新
|
/// 重新进入会刷新
|
||||||
// 播放完成/暂停播放
|
// 播放完成/暂停播放
|
||||||
|
|||||||
Reference in New Issue
Block a user