fix:首页布局问题

This commit is contained in:
zengyi 2025-09-24 11:07:31 +08:00
parent 3f710173d3
commit 7120208013
2 changed files with 144 additions and 136 deletions

View File

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter_kinetra/kt_pages/kt_explore/state.dart';
import 'package:get/get.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_request.dart';
import '../../kt_model/kt_short_video_bean.dart';
import '../../kt_utils/kt_device_info_utils.dart';
import '../../kt_widgets/kt_status_widget.dart';
class KtExploreLogic extends GetxController {
@ -145,7 +148,14 @@ class KtExploreLogic extends GetxController {
if (index < 0 || index >= state.videoList.length) return;
if (state.controllers[index] != null) return;
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!),
formatHint: VideoFormat.hls,
);

View File

@ -1030,8 +1030,7 @@ class _KtHomePageState extends State<KtHomePage>
),
SizedBox(height: 10.w),
if (state.topPickList.length > 3)
Expanded(
child: ListView.separated(
ListView.separated(
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
@ -1170,7 +1169,6 @@ class _KtHomePageState extends State<KtHomePage>
},
separatorBuilder: (_, __) => SizedBox(height: 10.w),
),
),
],
);
},