fix:首页布局问题
This commit is contained in:
parent
3f710173d3
commit
7120208013
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter_kinetra/kt_pages/kt_explore/state.dart';
|
import 'package:flutter_kinetra/kt_pages/kt_explore/state.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:easy_refresh/easy_refresh.dart';
|
import 'package:easy_refresh/easy_refresh.dart';
|
||||||
@ -7,6 +9,7 @@ import 'package:video_player/video_player.dart';
|
|||||||
import '../../dio_cilent/kt_apis.dart';
|
import '../../dio_cilent/kt_apis.dart';
|
||||||
import '../../dio_cilent/kt_request.dart';
|
import '../../dio_cilent/kt_request.dart';
|
||||||
import '../../kt_model/kt_short_video_bean.dart';
|
import '../../kt_model/kt_short_video_bean.dart';
|
||||||
|
import '../../kt_utils/kt_device_info_utils.dart';
|
||||||
import '../../kt_widgets/kt_status_widget.dart';
|
import '../../kt_widgets/kt_status_widget.dart';
|
||||||
|
|
||||||
class KtExploreLogic extends GetxController {
|
class KtExploreLogic extends GetxController {
|
||||||
@ -145,7 +148,14 @@ class KtExploreLogic extends GetxController {
|
|||||||
if (index < 0 || index >= state.videoList.length) return;
|
if (index < 0 || index >= state.videoList.length) return;
|
||||||
if (state.controllers[index] != null) return;
|
if (state.controllers[index] != null) return;
|
||||||
final episode = state.videoList[index];
|
final episode = state.videoList[index];
|
||||||
final controller = VideoPlayerController.networkUrl(
|
VideoPlayerController controller =
|
||||||
|
Platform.isAndroid && KtDeviceInfoUtil().osVersion == '10'
|
||||||
|
? VideoPlayerController.networkUrl(
|
||||||
|
Uri.parse(episode.videoInfo!.videoUrl!),
|
||||||
|
formatHint: VideoFormat.hls,
|
||||||
|
viewType: VideoViewType.platformView,
|
||||||
|
)
|
||||||
|
: VideoPlayerController.networkUrl(
|
||||||
Uri.parse(episode.videoInfo!.videoUrl!),
|
Uri.parse(episode.videoInfo!.videoUrl!),
|
||||||
formatHint: VideoFormat.hls,
|
formatHint: VideoFormat.hls,
|
||||||
);
|
);
|
||||||
|
@ -1030,8 +1030,7 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10.w),
|
||||||
if (state.topPickList.length > 3)
|
if (state.topPickList.length > 3)
|
||||||
Expanded(
|
ListView.separated(
|
||||||
child: ListView.separated(
|
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
@ -1170,7 +1169,6 @@ class _KtHomePageState extends State<KtHomePage>
|
|||||||
},
|
},
|
||||||
separatorBuilder: (_, __) => SizedBox(height: 10.w),
|
separatorBuilder: (_, __) => SizedBox(height: 10.w),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user