fix:p30兼容
This commit is contained in:
parent
0fac8844dc
commit
214dd1225d
@ -29,7 +29,7 @@ class _KtExplorePageState extends State<KtExplorePage>
|
||||
super.build(context);
|
||||
return GetBuilder<KtExploreLogic>(
|
||||
builder: (ctrl) {
|
||||
if(Get.find<KtMainLogic>().curIndex != 1) return Container();
|
||||
if (Get.find<KtMainLogic>().curIndex != 1) return Container();
|
||||
if (state.loadStatus == KtLoadStatusType.loadNoData ||
|
||||
state.loadStatus == KtLoadStatusType.loadFailed) {
|
||||
return KtStatusWidget(
|
||||
@ -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(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
@ -263,6 +277,7 @@ class _KtExplorePageState extends State<KtExplorePage>
|
||||
child: Image.asset('ic_play.png'.ktIcon, width: 62.w),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -96,7 +96,7 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
child: Text(
|
||||
'Get Hooked in Seconds',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
fontSize: 11.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.white,
|
||||
@ -166,7 +166,7 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 17.w),
|
||||
SizedBox(width: 15.w),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@ -184,7 +184,7 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset('ic_star.png'.ktIcon, width: 14.w),
|
||||
SizedBox(width: 4.w),
|
||||
SizedBox(width: 3.w),
|
||||
SizedBox(
|
||||
width: 162.w,
|
||||
child: Text(
|
||||
@ -257,7 +257,7 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
SizedBox(width: 4.w),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 9.w),
|
||||
SizedBox(height: 8.w),
|
||||
SizedBox(
|
||||
height: 117.w,
|
||||
child: ListView.separated(
|
||||
@ -555,8 +555,13 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child: SizedBox(
|
||||
width: ((ScreenUtil().screenWidth - 42.w) / 3) - 4.w,
|
||||
child: Text(
|
||||
textAlign: TextAlign.center,
|
||||
item.categoryName ?? '',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFF1E1E20),
|
||||
@ -566,6 +571,7 @@ class _KtHomePageState extends State<KtHomePage>
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, __) => SizedBox(width: 6.w),
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -8,6 +9,7 @@ import 'package:get/get.dart';
|
||||
import 'package:video_player/video_player.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_status_widget.dart';
|
||||
import '../../kt_widgets/kt_video_progress_bar.dart';
|
||||
@ -200,7 +202,19 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
||||
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)
|
||||
// Container(
|
||||
// width: ScreenUtil().screenWidth,
|
||||
@ -262,18 +276,24 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0.w,
|
||||
child: Container(
|
||||
child: Platform.isAndroid
|
||||
? SafeArea(child: bottomView(index))
|
||||
: bottomView(index),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottomView(int index) {
|
||||
return Container(
|
||||
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,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xFF001D1F).withValues(alpha: 0),
|
||||
Color(0xFF001D1F),
|
||||
],
|
||||
colors: [Color(0xFF001D1F).withValues(alpha: 0), Color(0xFF001D1F)],
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
@ -319,18 +339,12 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
||||
SizedBox(width: 6.w),
|
||||
Text(
|
||||
'EP.${index + 1}',
|
||||
style: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
style: TextStyle(fontSize: 13.sp, color: Colors.white),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'All ${state.video?.shortPlayInfo?.episodeTotal ?? 0} Episodes',
|
||||
style: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
style: TextStyle(fontSize: 13.sp, color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -358,9 +372,6 @@ class _VideoPlayPageState extends State<VideoPlayPage>
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user