opt handle res

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-29 17:17:35 +08:00
parent b643cb1bd0
commit 924d51d41b
198 changed files with 3715 additions and 2001 deletions

View File

@@ -6,7 +6,7 @@ import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/common/widgets/stat/stat.dart';
import 'package:PiliPlus/models/common/image_preview_type.dart';
import 'package:PiliPlus/models/pgc/info.dart';
import 'package:PiliPlus/models/pgc/pgc_info_model/result.dart';
import 'package:PiliPlus/pages/video/controller.dart';
import 'package:PiliPlus/pages/video/introduction/pgc/controller.dart';
import 'package:PiliPlus/pages/video/introduction/pgc/widgets/bangumi_panel.dart';
@@ -114,7 +114,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
),
if (bangumiItem.rating != null)
PBadge(
text: '评分 ${bangumiItem.rating!['score']!}',
text: '评分 ${bangumiItem.rating!.score!}',
top: null,
right: 6,
bottom: 6,
@@ -209,14 +209,13 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
StatView(
context: context,
theme: 'gray',
value:
Utils.numFormat(bangumiItem.stat!['views']),
value: Utils.numFormat(bangumiItem.stat!.views),
),
StatDanMu(
context: context,
theme: 'gray',
value: Utils.numFormat(
bangumiItem.stat!['danmakus']),
value:
Utils.numFormat(bangumiItem.stat!.danmakus),
),
if (isLandscape) ...[
areasAndPubTime(theme, bangumiItem),
@@ -287,7 +286,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
selectStatus: bangumiIntroController.hasLike.value,
isLoading: false,
semanticsLabel: '点赞',
text: Utils.numFormat(bangumiItem.stat!['likes']!),
text: Utils.numFormat(bangumiItem.stat!.likes),
needAnim: true,
hasTriple: bangumiIntroController.hasLike.value &&
bangumiIntroController.hasCoin &&
@@ -314,7 +313,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
selectStatus: bangumiIntroController.hasCoin,
isLoading: false,
semanticsLabel: '投币',
text: Utils.numFormat(bangumiItem.stat!['coins']!),
text: Utils.numFormat(bangumiItem.stat!.coins),
needAnim: true,
),
),
@@ -330,7 +329,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
selectStatus: bangumiIntroController.hasFav.value,
isLoading: false,
semanticsLabel: '收藏',
text: Utils.numFormat(bangumiItem.stat!['favorite']!),
text: Utils.numFormat(bangumiItem.stat!.favorite),
needAnim: true,
),
),
@@ -341,7 +340,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
selectStatus: false,
isLoading: false,
semanticsLabel: '评论',
text: Utils.numFormat(bangumiItem.stat!['reply']!),
text: Utils.numFormat(bangumiItem.stat!.reply),
),
ActionItem(
icon: const Icon(FontAwesomeIcons.shareFromSquare),
@@ -349,7 +348,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
selectStatus: false,
isLoading: false,
semanticsLabel: '转发',
text: Utils.numFormat(bangumiItem.stat!['share']!),
text: Utils.numFormat(bangumiItem.stat!.share),
),
],
),
@@ -372,7 +371,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
onTap: () => handleState(bangumiIntroController.actionLikeVideo),
selectStatus: bangumiIntroController.hasLike.value,
isLoading: false,
text: bangumiItem.stat!['likes']!.toString(),
text: bangumiItem.stat!.likes!.toString(),
),
),
Obx(
@@ -381,7 +380,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
onTap: () => handleState(bangumiIntroController.actionCoinVideo),
selectStatus: bangumiIntroController.hasCoin,
isLoading: false,
text: bangumiItem.stat!['coins']!.toString(),
text: bangumiItem.stat!.coins!.toString(),
),
),
Obx(
@@ -392,7 +391,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
.showFavBottomSheet(context, type: 'longPress'),
selectStatus: bangumiIntroController.hasFav.value,
isLoading: false,
text: bangumiItem.stat!['favorite']!.toString(),
text: bangumiItem.stat!.favorite!.toString(),
),
),
ActionRowItem(
@@ -400,7 +399,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
onTap: () => videoDetailCtr.tabCtr.animateTo(1),
selectStatus: false,
isLoading: false,
text: bangumiItem.stat!['reply']!.toString(),
text: bangumiItem.stat!.reply!.toString(),
),
ActionRowItem(
icon: const Icon(FontAwesomeIcons.share),
@@ -418,16 +417,14 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
spacing: 6,
children: [
Text(
(bangumiItem.areas!.isNotEmpty
? bangumiItem.areas!.first['name']
: ''),
(bangumiItem.areas!.isNotEmpty ? bangumiItem.areas!.first.name! : ''),
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
),
),
Text(
bangumiItem.publish!['pub_time_show'],
bangumiItem.publish!.pubTimeShow!,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
@@ -439,7 +436,7 @@ class _BangumiIntroPanelState extends State<BangumiIntroPanel>
Widget newEpDesc(ThemeData theme, BangumiInfoModel bangumiItem) {
return Text(
bangumiItem.newEp!['desc'],
bangumiItem.newEp!.desc!,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,