Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-20 21:01:17 +08:00
parent ae901c709d
commit abdde1f811
10 changed files with 30 additions and 22 deletions

View File

@@ -162,8 +162,9 @@ class AuthorPanel extends StatelessWidget {
children: [ children: [
CachedNetworkImage( CachedNetworkImage(
height: 32, height: 32,
imageUrl: item imageUrl: (item.modules.moduleAuthor
.modules.moduleAuthor.decorate['card_url'], .decorate['card_url'] as String)
.http2https,
), ),
if ((item.modules.moduleAuthor.decorate?['fan'] if ((item.modules.moduleAuthor.decorate?['fan']
?['num_str'] as String?) ?['num_str'] as String?)

View File

@@ -1,6 +1,7 @@
import 'package:PiliPlus/common/widgets/image_save.dart'; import 'package:PiliPlus/common/widgets/image_save.dart';
import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/page_utils.dart'; import 'package:PiliPlus/utils/page_utils.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -106,7 +107,8 @@ class DynamicPanel extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
width: 60, width: 60,
height: 60, height: 60,
imageUrl: item.modules.moduleAuthor.pendant['image'], imageUrl: Utils.thumbnailImgUrl(
item.modules.moduleAuthor.pendant['image']),
), ),
), ),
), ),

View File

@@ -5,6 +5,7 @@ import 'package:PiliPlus/models/common/tab_type.dart';
import 'package:PiliPlus/models/model_hot_video_item.dart'; import 'package:PiliPlus/models/model_hot_video_item.dart';
import 'package:PiliPlus/pages/common/common_page.dart'; import 'package:PiliPlus/pages/common/common_page.dart';
import 'package:PiliPlus/pages/rank/view.dart'; import 'package:PiliPlus/pages/rank/view.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -42,7 +43,8 @@ class _HotPageState extends CommonPageState<HotPage, HotController>
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
CachedNetworkImage(width: 35, height: 35, imageUrl: iconUrl), CachedNetworkImage(
width: 35, height: 35, imageUrl: Utils.thumbnailImgUrl(iconUrl)),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
title, title,

View File

@@ -6,7 +6,6 @@ import 'package:PiliPlus/pages/live_room/send_dm_panel.dart';
import 'package:PiliPlus/pages/live_room/widgets/chat.dart'; import 'package:PiliPlus/pages/live_room/widgets/chat.dart';
import 'package:PiliPlus/pages/live_room/widgets/header_control.dart'; import 'package:PiliPlus/pages/live_room/widgets/header_control.dart';
import 'package:PiliPlus/services/service_locator.dart'; import 'package:PiliPlus/services/service_locator.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/page_utils.dart'; import 'package:PiliPlus/utils/page_utils.dart';
import 'package:PiliPlus/utils/utils.dart'; import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
@@ -229,8 +228,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
fit: BoxFit.cover, fit: BoxFit.cover,
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
imageUrl: _liveRoomController.roomInfoH5.value imageUrl: Utils.thumbnailImgUrl(
.roomInfo!.appBackground!.http2https, _liveRoomController.roomInfoH5.value.roomInfo!
.appBackground!),
) )
: Image.asset( : Image.asset(
'assets/images/live/default_bg.webp', 'assets/images/live/default_bg.webp',

View File

@@ -100,7 +100,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
child: ClipOval( child: ClipOval(
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: imageUrl:
(loadingState.response['face'] as String).http2https, Utils.thumbnailImgUrl(loadingState.response['face']),
), ),
), ),
), ),

View File

@@ -86,7 +86,7 @@ class UserInfoCard extends StatelessWidget {
); );
}, },
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: imgUrl?.http2https ?? '', imageUrl: Utils.thumbnailImgUrl(imgUrl),
width: double.infinity, width: double.infinity,
height: 135, height: 135,
imageBuilder: (context, imageProvider) => Container( imageBuilder: (context, imageProvider) => Container(
@@ -176,7 +176,8 @@ class UserInfoCard extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
width: 18, width: 18,
height: 18, height: 18,
imageUrl: card.officialVerify!.icon!.http2https, imageUrl:
Utils.thumbnailImgUrl(card.officialVerify!.icon!),
), ),
), ),
), ),
@@ -412,7 +413,7 @@ class UserInfoCard extends StatelessWidget {
), ),
child: card.officialVerify?.icon?.isNotEmpty == true child: card.officialVerify?.icon?.isNotEmpty == true
? CachedNetworkImage( ? CachedNetworkImage(
imageUrl: card.officialVerify!.icon!.http2https, imageUrl: Utils.thumbnailImgUrl(card.officialVerify!.icon!),
width: 22, width: 22,
height: 22, height: 22,
) )
@@ -478,7 +479,7 @@ class UserInfoCard extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
width: 140, width: 140,
height: 140, height: 140,
imageUrl: card.pendant!.image!, imageUrl: Utils.thumbnailImgUrl(card.pendant!.image!),
), ),
), ),
), ),
@@ -543,13 +544,13 @@ class UserInfoCard extends StatelessWidget {
children: [ children: [
if (isDark && card.prInfo?.iconNight?.isNotEmpty == true) ...[ if (isDark && card.prInfo?.iconNight?.isNotEmpty == true) ...[
CachedNetworkImage( CachedNetworkImage(
imageUrl: card.prInfo!.iconNight!, imageUrl: Utils.thumbnailImgUrl(card.prInfo!.iconNight!),
height: 20, height: 20,
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
] else if (card.prInfo?.icon?.isNotEmpty == true) ...[ ] else if (card.prInfo?.icon?.isNotEmpty == true) ...[
CachedNetworkImage( CachedNetworkImage(
imageUrl: card.prInfo!.icon!, imageUrl: Utils.thumbnailImgUrl(card.prInfo!.icon!),
height: 20, height: 20,
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
@@ -636,7 +637,8 @@ class UserInfoCard extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
width: 140, width: 140,
height: 140, height: 140,
imageUrl: card.pendant!.image!, imageUrl:
Utils.thumbnailImgUrl(card.pendant!.image!),
), ),
), ),
), ),

View File

@@ -1,5 +1,6 @@
import 'package:PiliPlus/models/search/search_trending/trending_list.dart'; import 'package:PiliPlus/models/search/search_trending/trending_list.dart';
import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -52,7 +53,7 @@ class HotKeyword extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(left: 4), padding: const EdgeInsets.only(left: 4),
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: i.icon!.http2https, imageUrl: Utils.thumbnailImgUrl(i.icon!),
height: 15, height: 15,
), ),
) )

View File

@@ -5,7 +5,7 @@ import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
import 'package:PiliPlus/http/loading_state.dart'; import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/models/search/search_trending/trending_list.dart'; import 'package:PiliPlus/models/search/search_trending/trending_list.dart';
import 'package:PiliPlus/pages/search_trending/controller.dart'; import 'package:PiliPlus/pages/search_trending/controller.dart';
import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -200,7 +200,7 @@ class _SearchTrendingPageState extends State<SearchTrendingPage> {
if (item.icon?.isNotEmpty == true) ...[ if (item.icon?.isNotEmpty == true) ...[
const SizedBox(width: 4), const SizedBox(width: 4),
CachedNetworkImage( CachedNetworkImage(
imageUrl: item.icon!.http2https, imageUrl: Utils.thumbnailImgUrl(item.icon!),
height: 16, height: 16,
), ),
] else if (item.showLiveIcon == true) ...[ ] else if (item.showLiveIcon == true) ...[

View File

@@ -1,7 +1,6 @@
import 'package:PiliPlus/common/widgets/http_error.dart'; import 'package:PiliPlus/common/widgets/http_error.dart';
import 'package:PiliPlus/http/msg.dart'; import 'package:PiliPlus/http/msg.dart';
import 'package:PiliPlus/http/user.dart'; import 'package:PiliPlus/http/user.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/utils.dart'; import 'package:PiliPlus/utils/utils.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:easy_debounce/easy_throttle.dart'; import 'package:easy_debounce/easy_throttle.dart';
@@ -237,7 +236,7 @@ class _CreateFavPageState extends State<CreateFavPage> {
return ClipRRect( return ClipRRect(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: _cover!.http2https, imageUrl: Utils.thumbnailImgUrl(_cover!),
height: constraints.maxHeight, height: constraints.maxHeight,
width: constraints.maxHeight * 16 / 9, width: constraints.maxHeight * 16 / 9,
fit: BoxFit.cover, fit: BoxFit.cover,

View File

@@ -116,7 +116,7 @@ class ReplyItemGrpc extends StatelessWidget {
children: [ children: [
CachedNetworkImage( CachedNetworkImage(
height: 38, height: 38,
imageUrl: replyItem.member.garbCardImage, imageUrl: replyItem.member.garbCardImage.http2https,
), ),
if (replyItem.member.hasGarbCardNumber()) if (replyItem.member.hasGarbCardNumber())
Text( Text(
@@ -178,7 +178,8 @@ class ReplyItemGrpc extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
width: 52, width: 52,
height: 52, height: 52,
imageUrl: replyItem.member.garbPendantImage, imageUrl:
Utils.thumbnailImgUrl(replyItem.member.garbPendantImage),
), ),
), ),
), ),