fix:p30兼容
This commit is contained in:
parent
0fac8844dc
commit
214dd1225d
@ -174,6 +174,20 @@ class _KtExplorePageState extends State<KtExplorePage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (videoPlayerController.value.isInitialized)
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
videoPlayerController.value.isPlaying
|
||||||
|
? videoPlayerController.pause()
|
||||||
|
: videoPlayerController.play();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: ScreenUtil().screenHeight,
|
||||||
|
color: Colors.transparent,
|
||||||
|
),
|
||||||
|
),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
@ -263,6 +277,7 @@ class _KtExplorePageState extends State<KtExplorePage>
|
|||||||
child: Image.asset('ic_play.png'.ktIcon, width: 62.w),
|
child: Image.asset('ic_play.png'.ktIcon, width: 62.w),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -96,7 +96,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
child: Text(
|
child: Text(
|
||||||
'Get Hooked in Seconds',
|
'Get Hooked in Seconds',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 11.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -166,7 +166,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(width: 17.w),
|
SizedBox(width: 15.w),
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -184,7 +184,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Image.asset('ic_star.png'.ktIcon, width: 14.w),
|
Image.asset('ic_star.png'.ktIcon, width: 14.w),
|
||||||
SizedBox(width: 4.w),
|
SizedBox(width: 3.w),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 162.w,
|
width: 162.w,
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -257,7 +257,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
SizedBox(width: 4.w),
|
SizedBox(width: 4.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 9.w),
|
SizedBox(height: 8.w),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 117.w,
|
height: 117.w,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
@ -555,8 +555,13 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
child: SizedBox(
|
||||||
|
width: ((ScreenUtil().screenWidth - 42.w) / 3) - 4.w,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
item.categoryName ?? '',
|
item.categoryName ?? '',
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
color: Color(0xFF1E1E20),
|
color: Color(0xFF1E1E20),
|
||||||
@ -566,6 +571,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
separatorBuilder: (_, __) => SizedBox(width: 6.w),
|
separatorBuilder: (_, __) => SizedBox(width: 6.w),
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'dart:io';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -8,6 +9,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:video_player/video_player.dart';
|
import 'package:video_player/video_player.dart';
|
||||||
import 'package:visibility_detector/visibility_detector.dart';
|
import 'package:visibility_detector/visibility_detector.dart';
|
||||||
|
|
||||||
|
import '../../kt_model/kt_video_detail_bean.dart';
|
||||||
import '../../kt_widgets/kt_network_image.dart';
|
import '../../kt_widgets/kt_network_image.dart';
|
||||||
import '../../kt_widgets/kt_status_widget.dart';
|
import '../../kt_widgets/kt_status_widget.dart';
|
||||||
import '../../kt_widgets/kt_video_progress_bar.dart';
|
import '../../kt_widgets/kt_video_progress_bar.dart';
|
||||||
@ -200,7 +202,19 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
|||||||
if (!isAllOver) Center(child: CircularProgressIndicator()),
|
if (!isAllOver) Center(child: CircularProgressIndicator()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
if (controller != null && controller.value.isInitialized && !isAllOver)
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// if (episode.isLock == true) return;
|
||||||
|
controller.value.isPlaying ? controller.pause() : controller.play();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: ScreenUtil().screenHeight,
|
||||||
|
color: Colors.transparent,
|
||||||
|
),
|
||||||
|
),
|
||||||
// if (episode.isLock == true)
|
// if (episode.isLock == true)
|
||||||
// Container(
|
// Container(
|
||||||
// width: ScreenUtil().screenWidth,
|
// width: ScreenUtil().screenWidth,
|
||||||
@ -262,18 +276,24 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
|||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: 0.w,
|
left: 0.w,
|
||||||
child: Container(
|
child: Platform.isAndroid
|
||||||
|
? SafeArea(child: bottomView(index))
|
||||||
|
: bottomView(index),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget bottomView(int index) {
|
||||||
|
return Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
padding: EdgeInsets.fromLTRB(15.w, 40.w, 15.w, 40.w),
|
padding: EdgeInsets.fromLTRB(15.w, 40.w, 15.w, 50.w),
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [Color(0xFF001D1F).withValues(alpha: 0), Color(0xFF001D1F)],
|
||||||
Color(0xFF001D1F).withValues(alpha: 0),
|
|
||||||
Color(0xFF001D1F),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -319,18 +339,12 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
|||||||
SizedBox(width: 6.w),
|
SizedBox(width: 6.w),
|
||||||
Text(
|
Text(
|
||||||
'EP.${index + 1}',
|
'EP.${index + 1}',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 13.sp, color: Colors.white),
|
||||||
fontSize: 13.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Text(
|
||||||
'All ${state.video?.shortPlayInfo?.episodeTotal ?? 0} Episodes',
|
'All ${state.video?.shortPlayInfo?.episodeTotal ?? 0} Episodes',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 13.sp, color: Colors.white),
|
||||||
fontSize: 13.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -358,9 +372,6 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user