feat: 播放处理,个人中心,

This commit is contained in:
chengsiwen committed 2026-06-30 16:05:17 +08:00
1 parent e59ac2177b
commit 4ccea08472
37 files changed
+1425 -115

No files matched your search

+32 -6
View File
@@ -1,6 +1,9 @@
import 'package:flutter/material.dart';
import 'package:skywood/global/client/play_client.dart';
import 'package:skywood/main/lib_file.dart';
import 'package:skywood/pages/home/players/page/drama_detail_page.dart';
import 'package:skywood/utils/models/drama/skywood_drama.dart';
import 'package:skywood/utils/tools/widgets/sky_common_widget.dart';
class CollectionPage extends StatefulWidget {
@@ -14,16 +17,19 @@ class CollectionPage extends StatefulWidget {
class _CollectionPageState extends State<CollectionPage> {
List<SkywoodDrama> _collectionList = [];
@override
void initState() {
// TODO: implement initState
super.initState();
_getCollection();
}
void _getCollection() {
PlayClient.getCollections().then((value) {
setState(() {
_collectionList = value;
});
});
}
@@ -40,16 +46,36 @@ class _CollectionPageState extends State<CollectionPage> {
itemBuilder: (context, index) {
return _buildItem(index);
},
itemCount: 5,
itemCount: _collectionList.length,
);
}
Widget _buildItem(int index) {
final SkywoodDrama drama = _collectionList[index];
return Stack(
children: [
HelpImg.asset(ConstImg.collectionBg, width: 100.w, height: 174.w, fit: BoxFit.fill,),
SizedBox(
width: 100.w, height: 174.w,
child: HelpImg.asset(ConstImg.collectionBg, width: 100.w, height: 174.w, fit: BoxFit.fill,),
),
Positioned(
left: 5, right: 5, top: 32.w,
child: HelpImg.network(drama.imageUrl, height: 110.w, width: 90.w, fit: BoxFit.fill,),
),
Positioned(
bottom: 6, left: 2, right: 2,
child: SkyText(text: drama.name,
fontSize: 13,
color: CommonColor.black,
),
),
Positioned(
right: 10, top: 15,
child: HelpImg.asset(ConstImg.liked, width: 18, height: 18,),
)
],
);
).addInkWell(onTap: () {
HelpNav.to(DramaDetailPage(dramaBean: drama));
},);
}
}