fix:currentEpisodeIndex null
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pilipala/common/constants.dart';
|
import 'package:pilipala/common/constants.dart';
|
||||||
@ -183,7 +182,7 @@ class _PagesBottomSheetState extends State<PagesBottomSheet>
|
|||||||
isFixedHeight: true,
|
isFixedHeight: true,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
_listObserverControllerList![widget.currentEpisodeIndex!]
|
_listObserverControllerList![widget.currentEpisodeIndex ?? 0]
|
||||||
.initialIndexModel = ObserverIndexPositionModel(
|
.initialIndexModel = ObserverIndexPositionModel(
|
||||||
index: currentIndex,
|
index: currentIndex,
|
||||||
isFixedHeight: true,
|
isFixedHeight: true,
|
||||||
|
|||||||
@ -608,6 +608,7 @@ class VideoIntroController extends GetxController {
|
|||||||
// 播放器底栏 选集 回调
|
// 播放器底栏 选集 回调
|
||||||
void showEposideHandler() {
|
void showEposideHandler() {
|
||||||
late List episodes;
|
late List episodes;
|
||||||
|
int currentEpisodeIndex = 0;
|
||||||
VideoEpidoesType dataType = VideoEpidoesType.videoEpisode;
|
VideoEpidoesType dataType = VideoEpidoesType.videoEpisode;
|
||||||
if (videoDetail.value.ugcSeason != null) {
|
if (videoDetail.value.ugcSeason != null) {
|
||||||
dataType = VideoEpidoesType.videoEpisode;
|
dataType = VideoEpidoesType.videoEpisode;
|
||||||
@ -616,6 +617,7 @@ class VideoIntroController extends GetxController {
|
|||||||
final List<EpisodeItem> episodesList = sections[i].episodes!;
|
final List<EpisodeItem> episodesList = sections[i].episodes!;
|
||||||
for (int j = 0; j < episodesList.length; j++) {
|
for (int j = 0; j < episodesList.length; j++) {
|
||||||
if (episodesList[j].cid == lastPlayCid.value) {
|
if (episodesList[j].cid == lastPlayCid.value) {
|
||||||
|
currentEpisodeIndex = i;
|
||||||
episodes = episodesList;
|
episodes = episodesList;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -635,6 +637,7 @@ class VideoIntroController extends GetxController {
|
|||||||
sheetHeight: Get.size.height,
|
sheetHeight: Get.size.height,
|
||||||
isFullScreen: true,
|
isFullScreen: true,
|
||||||
ugcSeason: ugcSeason,
|
ugcSeason: ugcSeason,
|
||||||
|
currentEpisodeIndex: currentEpisodeIndex,
|
||||||
changeFucCall: (item, index) {
|
changeFucCall: (item, index) {
|
||||||
if (dataType == VideoEpidoesType.videoEpisode) {
|
if (dataType == VideoEpidoesType.videoEpisode) {
|
||||||
changeSeasonOrbangu(
|
changeSeasonOrbangu(
|
||||||
|
|||||||
Reference in New Issue
Block a user