chore: clean up

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-20 11:21:19 +08:00
parent ed60c274fc
commit 538494b7ec
90 changed files with 495 additions and 1816 deletions

View File

@@ -103,7 +103,6 @@ class BangumiIntroController
var result = await UserHttp.videoTags(bvid: bvid);
if (result['status']) {
videoTags = result['data'];
// debugPrint('tags: ${result['data']}');
}
}
@@ -562,10 +561,6 @@ class BangumiIntroController
scriptContent['props']['pageProps']['followState']['isFollowed'];
followStatus.value =
scriptContent['props']['pageProps']['followState']['followStatus'];
// int progress = scriptContent['props']['pageProps']['dehydratedState']
// ['queries'][0]['state']['data']['result']
// ['play_view_business_info']['user_status']['watch_progress']
// ['current_watch_progress'];
}
} catch (_) {}
}

View File

@@ -394,16 +394,6 @@ class _BangumiInfoState extends State<BangumiInfo> {
],
),
const SizedBox(height: 6),
// 点赞收藏转发 布局样式1
// SingleChildScrollView(
// padding: const EdgeInsets.only(top: 7, bottom: 7),
// scrollDirection: Axis.horizontal,
// child: actionRow(
// context,
// bangumiIntroController,
// videoDetailCtr,
// ),
// ),
// 点赞收藏转发 布局样式2
actionGrid(context, bangumiIntroController),
// 番剧分p

View File

@@ -68,24 +68,8 @@ class _BangumiPanelState extends State<BangumiPanel> {
super.dispose();
}
// void changeFucCall(item, i) async {
// if (item.badge != null && item.badge == '会员' && vipStatus != 1) {
// SmartDialog.showToast('需要大会员');
// return;
// }
// await widget.changeFuc!(
// item.bvid,
// item.cid,
// item.aid,
// );
// currentIndex = i;
// setState(() {});
// scrollToIndex();
// }
void scrollToIndex() {
WidgetsBinding.instance.addPostFrameCallback((_) {
// 在回调函数中获取更新后的状态
listViewScrollCtr.animateTo(
(currentIndex * 150.0).clamp(listViewScrollCtr.position.minScrollExtent,
listViewScrollCtr.position.maxScrollExtent),
@@ -148,11 +132,12 @@ class _BangumiPanelState extends State<BangumiPanel> {
scrollDirection: Axis.horizontal,
itemCount: widget.pages.length,
itemExtent: 150,
itemBuilder: (BuildContext context, int i) {
itemBuilder: (BuildContext context, int index) {
final item = widget.pages[index];
return Container(
width: 150,
margin: EdgeInsets.only(
right: i == widget.pages.length - 1 ? 0 : 10,
right: index == widget.pages.length - 1 ? 0 : 10,
),
child: Material(
color: Theme.of(context).colorScheme.onInverseSurface,
@@ -160,24 +145,19 @@ class _BangumiPanelState extends State<BangumiPanel> {
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {
if (widget.pages[i].badge != null &&
widget.pages[i].badge == '会员' &&
if (item.badge != null &&
item.badge == '会员' &&
vipStatus != 1) {
SmartDialog.showToast('需要大会员');
// return;
}
widget.changeFuc(
widget.pages[i].epId,
widget.pages[i].bvid,
widget.pages[i].cid,
widget.pages[i].aid,
widget.pages[i].cover,
item.epId,
item.bvid,
item.cid,
item.aid,
item.cover,
);
// currentIndex = i;
// setState(() {});
// scrollToIndex();
},
//changeFucCall(widget.pages[i], i),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 8, horizontal: 10),
@@ -186,7 +166,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
children: <Widget>[
Row(
children: [
if (i == currentIndex) ...<Widget>[
if (index == currentIndex) ...<Widget>[
Image.asset(
'assets/images/live.png',
color: Theme.of(context).colorScheme.primary,
@@ -197,32 +177,32 @@ class _BangumiPanelState extends State<BangumiPanel> {
],
Expanded(
child: Text(
widget.pages[i].title ?? '${i + 1}',
maxLines: (widget.pages[i].longTitle != null &&
widget.pages[i].longTitle != '')
item.title ?? '${index + 1}',
maxLines: (item.longTitle != null &&
item.longTitle != '')
? 1
: 2,
style: TextStyle(
fontSize: 13,
color: i == currentIndex
color: index == currentIndex
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onSurface),
)),
const SizedBox(width: 2),
if (widget.pages[i].badge != null) ...[
if (item.badge != null) ...[
const Spacer(),
if (widget.pages[i].badge == '会员') ...[
if (item.badge == '会员') ...[
Image.asset(
'assets/images/big-vip.png',
height: 16,
semanticLabel: "大会员",
),
],
if (widget.pages[i].badge != '会员') ...[
if (item.badge != '会员') ...[
Text(
widget.pages[i].badge!,
item.badge!,
style: TextStyle(
fontSize: 11,
color:
@@ -233,15 +213,15 @@ class _BangumiPanelState extends State<BangumiPanel> {
]
],
),
if (widget.pages[i].longTitle != null &&
widget.pages[i].longTitle != '') ...[
if (item.longTitle != null &&
item.longTitle != '') ...[
const SizedBox(height: 3),
Text(
widget.pages[i].longTitle!,
item.longTitle!,
maxLines: 1,
style: TextStyle(
fontSize: 13,
color: i == currentIndex
color: index == currentIndex
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme