feat: 分类页面优化,播放器详情处理当前集,首页的优化。图片导入。

This commit is contained in:
chengsiwen committed 2026-07-01 08:53:40 +08:00
1 parent 4ccea08472
commit 2f1ec27802
28 files changed
+868 -568

No files matched your search

@@ -6,6 +6,7 @@ import 'package:skywood/pages/home/players/widget/sky_player_view.dart';
import 'package:skywood/utils/models/drama/skywood_detail.dart';
import 'package:skywood/utils/models/drama/skywood_drama.dart';
import 'package:skywood/utils/models/drama/skywood_home.dart';
import 'package:skywood/utils/tools/app_toast.dart';
import 'package:skywood/utils/tools/widgets/sky_app_bar.dart';
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
@@ -34,10 +35,13 @@ class _DramaDetailPageState extends State<DramaDetailPage> {
}
void _getDetailDrama() {
print('currentEpisode===${widget.dramaBean.currentEpisode}');
AppToast.showLottieLoading();
PlayClient.getVideoDetail(
shortPlayId: widget.dramaBean.shortPlayId ?? 0,
shortPlayVideoId: widget.dramaBean.shortPlayVideoId ?? 0
).then((value) {
AppToast.dismiss();
setState(() {
_detailBean = value;
});
@@ -57,11 +61,10 @@ class _DramaDetailPageState extends State<DramaDetailPage> {
children: [
SizedBox(width: double.infinity, height: double.infinity),
if (widget.dramaBean.videoUrl != null)
if (_detailBean != null)
Positioned(
bottom: 0, left: 0, right: 0, top: 0,
child: SkyPlayerView(
videoUrl: widget.dramaBean.videoUrl!,
detailBean: _detailBean,
dramaBean: widget.dramaBean,
),
@@ -6,10 +6,15 @@ import 'package:skywood/utils/models/drama/skywood_episode.dart';
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
class DramaEspPage extends StatefulWidget {
const DramaEspPage({super.key, required this.detail, this.currentEpisode});
const DramaEspPage({super.key,
required this.detail,
this.currentEpisode,
this.onSelectedEpisode,
});
final SkywoodDetail detail;
final int? currentEpisode;
final Function(int)? onSelectedEpisode;
@override
State<StatefulWidget> createState() {
@@ -182,6 +187,7 @@ class _DramaEspPageState extends State<DramaEspPage> {
setState(() {
_selectedEpisode = episode.episode;
});
widget.onSelectedEpisode?.call(_selectedEpisode);
},
child: Container(
alignment: Alignment.center,