fix: app id修改,视频详情加可滑动
This commit is contained in:
1 parent
fc445e7c80
commit
27529578ce
6 files changed
+28
-10
No files matched your search
@@ -4,9 +4,10 @@ final class ApiConst {
|
||||
static const appName = 'Glimzo';
|
||||
static const int pageSize = 12;
|
||||
// https://api-glimzodf.glimzodf.com/glimzodf
|
||||
static const String apiLink = 'https://api-quickeltv.quickeltv.com/quickeltv';
|
||||
static const String apiLink = 'https://api-glimzodf.glimzodf.com/glimzodf';
|
||||
|
||||
static String webPrefix = "quickeltv.com";
|
||||
// https://glimzodf.com
|
||||
static String webPrefix = "glimzodf.com";
|
||||
|
||||
static String webIndex = "https://$webPrefix";
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ class _MainRootState extends State<HomePage> {
|
||||
|
||||
for (SkywoodHome element in homeData) {
|
||||
print('lele: ${element.moduleKey} : ${element.dataList.length}');
|
||||
print('url: ${element.dataList.first.imageUrl}');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ class DramaDetailPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _DramaDetailPageState extends State<DramaDetailPage> {
|
||||
static const int _preloadCount = 1;
|
||||
|
||||
SkywoodDetail? _detailBean;
|
||||
SkywoodEpisode? _selectedEpisode;
|
||||
final PageController _pageController = PageController();
|
||||
@@ -195,12 +197,17 @@ class _DramaDetailPageState extends State<DramaDetailPage> {
|
||||
return PageView.builder(
|
||||
controller: _pageController,
|
||||
scrollDirection: Axis.vertical,
|
||||
allowImplicitScrolling: true,
|
||||
onPageChanged: _onPageChanged,
|
||||
itemCount: episodes.length,
|
||||
itemBuilder: (context, index) {
|
||||
final episode = episodes[index];
|
||||
final isCurrent = index == _currentPageIndex;
|
||||
|
||||
if (!_shouldBuildPlayer(index)) {
|
||||
return const ColoredBox(color: Colors.black);
|
||||
}
|
||||
|
||||
return SkyPlayerView(
|
||||
key: ValueKey(
|
||||
'${episode.shortPlayVideoId}-$isCurrent-${detail.videoInfo?.shortPlayVideoId}',
|
||||
@@ -215,6 +222,10 @@ class _DramaDetailPageState extends State<DramaDetailPage> {
|
||||
);
|
||||
}
|
||||
|
||||
bool _shouldBuildPlayer(int index) {
|
||||
return (index - _currentPageIndex).abs() <= _preloadCount;
|
||||
}
|
||||
|
||||
Widget _headerWidget() {
|
||||
return Container(
|
||||
height: 40,
|
||||
|
||||
@@ -188,7 +188,12 @@ class HelpImg {
|
||||
// }
|
||||
return FadeInImage.assetNetwork(
|
||||
placeholder: isWidth==true ? ConstImg.spaceImgW : ConstImg.spaceImgH, image: path,
|
||||
width: width, height: height, fit: BoxFit.cover
|
||||
width: width, height: height, fit: BoxFit.cover,
|
||||
imageErrorBuilder: (context, error, stackTrace) {
|
||||
return HelpImg.asset(isWidth==true ? ConstImg.spaceImgW : ConstImg.spaceImgH, fit: BoxFit.fill,
|
||||
width: width, height: height
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
return Image.network(
|
||||
|
||||
Reference in new issue
Block a user