mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-28 21:30:18 +08:00
opt: svg big-vip
This commit is contained in:
@@ -6,7 +6,7 @@ abstract final class Assets {
|
||||
static const logoIco = 'assets/images/logo/ico/app_icon.ico';
|
||||
static const logoLarge = 'assets/images/logo/desktop/logo_large.png';
|
||||
|
||||
static const vipIcon = 'assets/images/big-vip.png';
|
||||
static const vipIcon = 'assets/images/big-vip.svg';
|
||||
static const avatarPlaceHolder = 'assets/images/noface.jpeg';
|
||||
static const loading = 'assets/images/loading.png';
|
||||
static const buffering = 'assets/images/loading.webp';
|
||||
|
||||
@@ -4,10 +4,10 @@ import 'package:PiliPlus/common/widgets/extra_hittest_stack.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/models/common/avatar_badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
class PendantAvatar extends StatelessWidget {
|
||||
const PendantAvatar(
|
||||
@@ -142,12 +142,11 @@ class PendantAvatar extends StatelessWidget {
|
||||
|
||||
Widget _buildBadge(BuildContext context, ColorScheme colorScheme) {
|
||||
final child = switch (badgeType) {
|
||||
.vip => Image.asset(
|
||||
.vip => SvgPicture.asset(
|
||||
Assets.vipIcon,
|
||||
width: badgeSize,
|
||||
height: badgeSize,
|
||||
cacheWidth: badgeSize.cacheSize(context),
|
||||
semanticLabel: badgeType.desc,
|
||||
semanticsLabel: badgeType.desc,
|
||||
),
|
||||
_ => Icon(
|
||||
Icons.offline_bolt,
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart' hide ListTile;
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
|
||||
@@ -274,11 +275,10 @@ class _MediaPageState extends CommonPageState<MinePage>
|
||||
Positioned(
|
||||
right: -1,
|
||||
bottom: -2,
|
||||
child: Image.asset(
|
||||
child: SvgPicture.asset(
|
||||
Assets.vipIcon,
|
||||
height: 19,
|
||||
cacheHeight: 19.cacheSize(context),
|
||||
semanticLabel: "大会员",
|
||||
semanticsLabel: "大会员",
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class PgcPanel extends StatefulWidget {
|
||||
@@ -213,11 +214,10 @@ class _PgcPanelState extends State<PgcPanel> {
|
||||
if (item.badge?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 2),
|
||||
if (item.badge == '会员')
|
||||
Image.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.vipIcon,
|
||||
height: 16,
|
||||
cacheHeight: 16.cacheSize(context),
|
||||
semanticLabel: "大会员",
|
||||
semanticsLabel: "大会员",
|
||||
)
|
||||
else
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user