mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 09:37:02 +08:00
@@ -884,4 +884,6 @@ class Api {
|
|||||||
static const String spaceSetting = '/x/space/setting/app';
|
static const String spaceSetting = '/x/space/setting/app';
|
||||||
|
|
||||||
static const String spaceSettingMod = '/x/space/privacy/batch/modify';
|
static const String spaceSettingMod = '/x/space/privacy/batch/modify';
|
||||||
|
|
||||||
|
static const String vipExpAdd = '/x/vip/experience/add';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -383,4 +383,19 @@ class UserHttp {
|
|||||||
return {'status': false, 'msg': res.data['message']};
|
return {'status': false, 'msg': res.data['message']};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future vipExpAdd() async {
|
||||||
|
final res = await Request().post(
|
||||||
|
Api.vipExpAdd,
|
||||||
|
queryParameters: {
|
||||||
|
'mid': Accounts.main.mid,
|
||||||
|
'csrf': Accounts.main.csrf,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (res.data['code'] == 0) {
|
||||||
|
return {'status': true};
|
||||||
|
} else {
|
||||||
|
return {'status': false, 'msg': res.data['message']};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ class Vip {
|
|||||||
Label? label;
|
Label? label;
|
||||||
|
|
||||||
Vip.fromJson(Map<String, dynamic> json) {
|
Vip.fromJson(Map<String, dynamic> json) {
|
||||||
type = json['type'];
|
type = json['type'] ?? json['vipType'];
|
||||||
status = json['status'] ?? 0;
|
status = json['status'] ?? json['vipStatus'] ?? 0;
|
||||||
dueDate = json['due_date'];
|
dueDate = json['due_date'] ?? json['vipDueDate'];
|
||||||
if (json['label'] != null) label = Label.fromJson(json['label']);
|
if (json['label'] != null) label = Label.fromJson(json['label']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,9 +251,12 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
return AnimatedOpacity(
|
return AnimatedOpacity(
|
||||||
opacity: _visibleTitle.value ? 1 : 0,
|
opacity: _visibleTitle.value ? 1 : 0,
|
||||||
duration: const Duration(milliseconds: 300),
|
duration: const Duration(milliseconds: 300),
|
||||||
child: AuthorPanel(
|
child: IgnorePointer(
|
||||||
item: _controller.dynItem,
|
ignoring: !_visibleTitle.value,
|
||||||
isDetail: true,
|
child: AuthorPanel(
|
||||||
|
item: _controller.dynItem,
|
||||||
|
isDetail: true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:math';
|
|||||||
|
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/member.dart';
|
import 'package:PiliPlus/http/member.dart';
|
||||||
|
import 'package:PiliPlus/http/user.dart';
|
||||||
import 'package:PiliPlus/http/video.dart';
|
import 'package:PiliPlus/http/video.dart';
|
||||||
import 'package:PiliPlus/models/common/member/tab_type.dart';
|
import 'package:PiliPlus/models/common/member/tab_type.dart';
|
||||||
import 'package:PiliPlus/models_new/space/space/data.dart';
|
import 'package:PiliPlus/models_new/space/space/data.dart';
|
||||||
@@ -255,4 +256,13 @@ class MemberController extends CommonDataController<SpaceData, SpaceData?>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> vipExpAdd() async {
|
||||||
|
var res = await UserHttp.vipExpAdd();
|
||||||
|
if (res['status']) {
|
||||||
|
SmartDialog.showToast('领取成功');
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,22 @@ class _MemberPageState extends State<MemberPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_userController.ownerMid != 0)
|
if (_userController.ownerMid != 0)
|
||||||
if (_userController.mid == _userController.ownerMid)
|
if (_userController.mid == _userController.ownerMid) ...[
|
||||||
|
if ((_userController
|
||||||
|
.loadingState.value.data?.card?.vip?.status ??
|
||||||
|
0) >
|
||||||
|
0)
|
||||||
|
PopupMenuItem(
|
||||||
|
onTap: _userController.vipExpAdd,
|
||||||
|
child: const Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.upcoming_outlined, size: 19),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Text('大会员经验'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () => Get.toNamed('/spaceSetting'),
|
onTap: () => Get.toNamed('/spaceSetting'),
|
||||||
child: const Row(
|
child: const Row(
|
||||||
@@ -147,8 +162,8 @@ class _MemberPageState extends State<MemberPage> {
|
|||||||
Text('空间设置'),
|
Text('空间设置'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
else ...[
|
] else ...[
|
||||||
const PopupMenuDivider(),
|
const PopupMenuDivider(),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () => showDialog(
|
onTap: () => showDialog(
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/models/common/image_type.dart';
|
||||||
import 'package:PiliPlus/models/common/theme/theme_type.dart';
|
import 'package:PiliPlus/models/common/theme/theme_type.dart';
|
||||||
import 'package:PiliPlus/models/user/info.dart';
|
import 'package:PiliPlus/models/user/info.dart';
|
||||||
import 'package:PiliPlus/pages/mine/controller.dart';
|
import 'package:PiliPlus/pages/mine/controller.dart';
|
||||||
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
@@ -18,67 +20,63 @@ class _MinePageState extends State<MinePage> {
|
|||||||
final MineController _mineController = Get.put(MineController())
|
final MineController _mineController = Get.put(MineController())
|
||||||
..queryUserInfo();
|
..queryUserInfo();
|
||||||
|
|
||||||
Widget _header(ThemeData theme) => FittedBox(
|
Widget _header(ThemeData theme) => Row(
|
||||||
child: Row(
|
children: [
|
||||||
mainAxisSize: MainAxisSize.min,
|
const SizedBox(width: 12),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Image.asset(
|
||||||
children: [
|
'assets/images/logo/logo.png',
|
||||||
const SizedBox(width: 12),
|
width: 35,
|
||||||
Image.asset(
|
),
|
||||||
'assets/images/logo/logo.png',
|
const SizedBox(width: 5),
|
||||||
width: 35,
|
Text(
|
||||||
|
'PiliPlus',
|
||||||
|
style: theme.textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
tooltip: "${MineController.anonymity.value ? '退出' : '进入'}无痕模式",
|
||||||
Text(
|
onPressed: () {
|
||||||
'PiliPlus',
|
MineController.onChangeAnonymity(context);
|
||||||
style: theme.textTheme.titleMedium,
|
setState(() {});
|
||||||
|
},
|
||||||
|
icon: MineController.anonymity.value
|
||||||
|
? const Icon(MdiIcons.incognito, size: 24)
|
||||||
|
: const Icon(MdiIcons.incognitoOff, size: 24),
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() {
|
||||||
|
return IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
),
|
||||||
|
tooltip: '切换至${_mineController.nextThemeType.description}主题',
|
||||||
|
onPressed: _mineController.onChangeTheme,
|
||||||
|
icon: _mineController.themeType.value.icon,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 30),
|
tooltip: '设置',
|
||||||
IconButton(
|
onPressed: () => {
|
||||||
iconSize: 40.0,
|
Get.back(),
|
||||||
padding: const EdgeInsets.all(8),
|
Get.toNamed('/setting', preventDuplicates: false),
|
||||||
style: const ButtonStyle(
|
},
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
icon: const Icon(MdiIcons.cogs, size: 24),
|
||||||
),
|
),
|
||||||
tooltip: "${MineController.anonymity.value ? '退出' : '进入'}无痕模式",
|
const SizedBox(width: 10),
|
||||||
onPressed: () {
|
],
|
||||||
MineController.onChangeAnonymity(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
icon: MineController.anonymity.value
|
|
||||||
? const Icon(MdiIcons.incognito, size: 24)
|
|
||||||
: const Icon(MdiIcons.incognitoOff, size: 24),
|
|
||||||
),
|
|
||||||
Obx(
|
|
||||||
() {
|
|
||||||
return IconButton(
|
|
||||||
iconSize: 40.0,
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
style: const ButtonStyle(
|
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
||||||
),
|
|
||||||
tooltip: '切换至${_mineController.nextThemeType.description}主题',
|
|
||||||
onPressed: _mineController.onChangeTheme,
|
|
||||||
icon: _mineController.themeType.value.icon,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
iconSize: 40.0,
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
style: const ButtonStyle(
|
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
||||||
),
|
|
||||||
tooltip: '设置',
|
|
||||||
onPressed: () => {
|
|
||||||
Get.back(),
|
|
||||||
Get.toNamed('/setting', preventDuplicates: false),
|
|
||||||
},
|
|
||||||
icon: const Icon(MdiIcons.cogs, size: 24),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -98,7 +96,8 @@ class _MinePageState extends State<MinePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget userInfoBuild(ThemeData theme) {
|
Widget userInfoBuild(ThemeData theme) {
|
||||||
LevelInfo? levelInfo = _mineController.userInfo.value.levelInfo;
|
UserInfoData userInfo = _mineController.userInfo.value;
|
||||||
|
LevelInfo? levelInfo = userInfo.levelInfo;
|
||||||
TextStyle style = TextStyle(
|
TextStyle style = TextStyle(
|
||||||
fontSize: theme.textTheme.titleMedium!.fontSize,
|
fontSize: theme.textTheme.titleMedium!.fontSize,
|
||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
@@ -115,28 +114,38 @@ class _MinePageState extends State<MinePage> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
ClipOval(
|
userInfo.face != null
|
||||||
child: _mineController.userInfo.value.face != null
|
? Stack(
|
||||||
? NetworkImgLayer(
|
clipBehavior: Clip.none,
|
||||||
src: _mineController.userInfo.value.face,
|
children: [
|
||||||
semanticsLabel: '头像',
|
NetworkImgLayer(
|
||||||
|
src: userInfo.face,
|
||||||
|
semanticsLabel: '头像',
|
||||||
|
type: ImageType.avatar,
|
||||||
|
width: 55,
|
||||||
|
height: 55,
|
||||||
|
),
|
||||||
|
if (userInfo.vipStatus != null &&
|
||||||
|
userInfo.vipStatus! > 0)
|
||||||
|
Positioned(
|
||||||
|
right: -1,
|
||||||
|
bottom: -2,
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/big-vip.png',
|
||||||
|
height: 19,
|
||||||
|
semanticLabel: "大会员",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: ClipOval(
|
||||||
|
child: Image.asset(
|
||||||
width: 55,
|
width: 55,
|
||||||
height: 55,
|
height: 55,
|
||||||
)
|
'assets/images/noface.jpeg',
|
||||||
: Container(
|
semanticLabel: "默认头像",
|
||||||
width: 55,
|
|
||||||
height: 55,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
color: theme.colorScheme.onInverseSurface,
|
|
||||||
),
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/noface.jpeg',
|
|
||||||
semanticLabel: "默认头像",
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -144,24 +153,27 @@ class _MinePageState extends State<MinePage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
FittedBox(
|
Row(
|
||||||
child: Row(
|
spacing: 4,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
Flexible(
|
||||||
Text(
|
child: Text(
|
||||||
_mineController.userInfo.value.uname ?? '点击头像登录',
|
userInfo.uname ?? '点击头像登录',
|
||||||
style: theme.textTheme.titleMedium!
|
style: theme.textTheme.titleMedium!.copyWith(
|
||||||
.copyWith(height: 1),
|
height: 1,
|
||||||
|
color: userInfo.vipStatus != null &&
|
||||||
|
userInfo.vipStatus! > 0 &&
|
||||||
|
userInfo.vipType == 2
|
||||||
|
? context.vipColor
|
||||||
|
: null,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/lv/lv${_mineController.userInfo.value.isSeniorMember == 1 ? '6_s' : _mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}.png',
|
'assets/images/lv/lv${levelInfo == null ? 0 : userInfo.isSeniorMember == 1 ? '6_s' : levelInfo.currentLevel}.png',
|
||||||
height: 10,
|
height: 10,
|
||||||
semanticLabel:
|
),
|
||||||
'等级:${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}',
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
@@ -176,9 +188,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text: userInfo.money?.toString() ?? '-',
|
||||||
(_mineController.userInfo.value.money ?? '-')
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -186,7 +196,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: " 经验 ",
|
text: " 经验 ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||||
color: theme.colorScheme.outline,
|
color: theme.colorScheme.outline,
|
||||||
@@ -215,17 +225,14 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
SizedBox(
|
LinearProgressIndicator(
|
||||||
height: 2,
|
minHeight: 2,
|
||||||
child: LinearProgressIndicator(
|
value: levelInfo != null
|
||||||
minHeight: 2,
|
? (levelInfo.currentExp! / levelInfo.nextExp!)
|
||||||
value: levelInfo != null
|
: 0,
|
||||||
? (levelInfo.currentExp! / levelInfo.nextExp!)
|
backgroundColor: theme.colorScheme.inversePrimary,
|
||||||
: 0,
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
backgroundColor: theme.colorScheme.inversePrimary,
|
theme.colorScheme.primary),
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
theme.colorScheme.primary),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -235,83 +242,70 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
SizedBox(
|
Center(
|
||||||
width: 240,
|
child: SizedBox(
|
||||||
height: 100,
|
width: 240,
|
||||||
child: GridView.count(
|
child: Row(
|
||||||
padding: EdgeInsets.zero,
|
children: [
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
_btn(
|
||||||
crossAxisCount: 3,
|
count: _mineController.userStat.value.dynamicCount,
|
||||||
children: [
|
countStyle: style,
|
||||||
InkWell(
|
name: '动态',
|
||||||
onTap: _mineController.pushDynamic,
|
nameStyle: theme.textTheme.labelMedium,
|
||||||
borderRadius: StyleString.mdRadius,
|
onTap: _mineController.pushDynamic,
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
(_mineController.userStat.value.dynamicCount ?? '-')
|
|
||||||
.toString(),
|
|
||||||
key: ValueKey<String>(_mineController
|
|
||||||
.userStat.value.dynamicCount
|
|
||||||
.toString()),
|
|
||||||
style: style,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'动态',
|
|
||||||
style: theme.textTheme.labelMedium,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
_btn(
|
||||||
InkWell(
|
count: _mineController.userStat.value.following,
|
||||||
onTap: _mineController.pushFollow,
|
countStyle: style,
|
||||||
borderRadius: StyleString.mdRadius,
|
name: '关注',
|
||||||
child: Column(
|
nameStyle: theme.textTheme.labelMedium,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
onTap: _mineController.pushFollow,
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
(_mineController.userStat.value.following ?? '-')
|
|
||||||
.toString(),
|
|
||||||
key: ValueKey<String>(
|
|
||||||
_mineController.userStat.value.following.toString()),
|
|
||||||
style: style,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'关注',
|
|
||||||
style: theme.textTheme.labelMedium,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
_btn(
|
||||||
InkWell(
|
count: _mineController.userStat.value.follower,
|
||||||
onTap: _mineController.pushFans,
|
countStyle: style,
|
||||||
borderRadius: StyleString.mdRadius,
|
name: '粉丝',
|
||||||
child: Column(
|
nameStyle: theme.textTheme.labelMedium,
|
||||||
mainAxisSize: MainAxisSize.min,
|
onTap: _mineController.pushFans,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
(_mineController.userStat.value.follower ?? '-')
|
|
||||||
.toString(),
|
|
||||||
key: ValueKey<String>(
|
|
||||||
_mineController.userStat.value.follower.toString()),
|
|
||||||
style: style,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'粉丝',
|
|
||||||
style: theme.textTheme.labelMedium,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _btn({
|
||||||
|
required int? count,
|
||||||
|
required TextStyle countStyle,
|
||||||
|
required String name,
|
||||||
|
required TextStyle? nameStyle,
|
||||||
|
required VoidCallback onTap,
|
||||||
|
}) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
borderRadius: StyleString.mdRadius,
|
||||||
|
child: SizedBox(
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
count?.toString() ?? '-',
|
||||||
|
style: countStyle,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
name,
|
||||||
|
style: nameStyle,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class _PgcReviewPageState extends State<PgcReviewPage>
|
|||||||
indicatorWeight: 0,
|
indicatorWeight: 0,
|
||||||
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
||||||
splashFactory: NoSplash.splashFactory,
|
splashFactory: NoSplash.splashFactory,
|
||||||
|
padding: const EdgeInsets.only(left: 6),
|
||||||
indicatorPadding:
|
indicatorPadding:
|
||||||
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
||||||
indicator: BoxDecoration(
|
indicator: BoxDecoration(
|
||||||
|
|||||||
@@ -193,14 +193,13 @@ class _PgcPanelState extends State<PgcPanel> {
|
|||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
if (item.badge != null) ...[
|
if (item.badge != null) ...[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (item.badge == '会员') ...[
|
if (item.badge == '会员')
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
height: 16,
|
height: 16,
|
||||||
semanticLabel: "大会员",
|
semanticLabel: "大会员",
|
||||||
),
|
)
|
||||||
],
|
else
|
||||||
if (item.badge != '会员') ...[
|
|
||||||
Text(
|
Text(
|
||||||
item.badge!,
|
item.badge!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -208,7 +207,6 @@ class _PgcPanelState extends State<PgcPanel> {
|
|||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user