mod: 个人中心注释
This commit is contained in:
@ -179,59 +179,59 @@ class _MemberPageState extends State<MemberPage>
|
|||||||
fontWeight:
|
fontWeight:
|
||||||
FontWeight.bold),
|
FontWeight.bold),
|
||||||
)),
|
)),
|
||||||
const SizedBox(width: 2),
|
// const SizedBox(width: 2),
|
||||||
if (_memberController
|
// if (_memberController
|
||||||
.memberInfo.value.sex ==
|
// .memberInfo.value.sex ==
|
||||||
'女')
|
// '女')
|
||||||
const Icon(
|
// const Icon(
|
||||||
FontAwesomeIcons.venus,
|
// FontAwesomeIcons.venus,
|
||||||
size: 14,
|
// size: 14,
|
||||||
color: Colors.pink,
|
// color: Colors.pink,
|
||||||
),
|
// ),
|
||||||
if (_memberController
|
// if (_memberController
|
||||||
.memberInfo.value.sex ==
|
// .memberInfo.value.sex ==
|
||||||
'男')
|
// '男')
|
||||||
const Icon(
|
// const Icon(
|
||||||
FontAwesomeIcons.mars,
|
// FontAwesomeIcons.mars,
|
||||||
size: 14,
|
// size: 14,
|
||||||
color: Colors.blue,
|
// color: Colors.blue,
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 4),
|
// const SizedBox(width: 4),
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
'assets/images/lv/lv${_memberController.memberInfo.value.level}.png',
|
// 'assets/images/lv/lv${_memberController.memberInfo.value.level}.png',
|
||||||
height: 11,
|
// height: 11,
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 6),
|
// const SizedBox(width: 6),
|
||||||
if (_memberController.memberInfo
|
// if (_memberController.memberInfo
|
||||||
.value.vip!.status ==
|
// .value.vip!.status ==
|
||||||
1 &&
|
// 1 &&
|
||||||
_memberController.memberInfo
|
// _memberController.memberInfo
|
||||||
.value.vip!.label![
|
// .value.vip!.label![
|
||||||
'img_label_uri_hans'] !=
|
// 'img_label_uri_hans'] !=
|
||||||
'') ...[
|
// '') ...[
|
||||||
Image.network(
|
// Image.network(
|
||||||
_memberController.memberInfo
|
// _memberController.memberInfo
|
||||||
.value.vip!.label![
|
// .value.vip!.label![
|
||||||
'img_label_uri_hans'],
|
// 'img_label_uri_hans'],
|
||||||
height: 20,
|
// height: 20,
|
||||||
),
|
// ),
|
||||||
] else if (_memberController
|
// ] else if (_memberController
|
||||||
.memberInfo
|
// .memberInfo
|
||||||
.value
|
// .value
|
||||||
.vip!
|
// .vip!
|
||||||
.status ==
|
// .status ==
|
||||||
1 &&
|
// 1 &&
|
||||||
_memberController.memberInfo
|
// _memberController.memberInfo
|
||||||
.value.vip!.label![
|
// .value.vip!.label![
|
||||||
'img_label_uri_hans_static'] !=
|
// 'img_label_uri_hans_static'] !=
|
||||||
'') ...[
|
// '') ...[
|
||||||
Image.network(
|
// Image.network(
|
||||||
_memberController.memberInfo
|
// _memberController.memberInfo
|
||||||
.value.vip!.label![
|
// .value.vip!.label![
|
||||||
'img_label_uri_hans_static'],
|
// 'img_label_uri_hans_static'],
|
||||||
height: 20,
|
// height: 20,
|
||||||
),
|
// ),
|
||||||
]
|
// ]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (_memberController.memberInfo.value
|
if (_memberController.memberInfo.value
|
||||||
|
@ -76,79 +76,79 @@ Widget profile(ctr, {loadingStatus = false}) {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
// Padding(
|
||||||
padding: const EdgeInsets.only(left: 10, right: 10),
|
// padding: const EdgeInsets.only(left: 10, right: 10),
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
// mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
// children: [
|
||||||
InkWell(
|
// InkWell(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
Get.toNamed(
|
// Get.toNamed(
|
||||||
'/follow?mid=${memberInfo.mid}&name=${memberInfo.name}');
|
// '/follow?mid=${memberInfo.mid}&name=${memberInfo.name}');
|
||||||
},
|
// },
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
!loadingStatus
|
// !loadingStatus
|
||||||
? ctr.userStat!['following'].toString()
|
// ? ctr.userStat!['following'].toString()
|
||||||
: '-',
|
// : '-',
|
||||||
style: const TextStyle(
|
// style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold),
|
// fontWeight: FontWeight.bold),
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
'关注',
|
// '关注',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: Theme.of(context)
|
// fontSize: Theme.of(context)
|
||||||
.textTheme
|
// .textTheme
|
||||||
.labelMedium!
|
// .labelMedium!
|
||||||
.fontSize),
|
// .fontSize),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
InkWell(
|
// InkWell(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
Get.toNamed(
|
// Get.toNamed(
|
||||||
'/fan?mid=${memberInfo.mid}&name=${memberInfo.name}');
|
// '/fan?mid=${memberInfo.mid}&name=${memberInfo.name}');
|
||||||
},
|
// },
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
!loadingStatus
|
// !loadingStatus
|
||||||
? Utils.numFormat(
|
// ? Utils.numFormat(
|
||||||
ctr.userStat!['follower'],
|
// ctr.userStat!['follower'],
|
||||||
)
|
// )
|
||||||
: '-',
|
// : '-',
|
||||||
style: const TextStyle(
|
// style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold)),
|
// fontWeight: FontWeight.bold)),
|
||||||
Text('粉丝',
|
// Text('粉丝',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: Theme.of(context)
|
// fontSize: Theme.of(context)
|
||||||
.textTheme
|
// .textTheme
|
||||||
.labelMedium!
|
// .labelMedium!
|
||||||
.fontSize))
|
// .fontSize))
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Column(
|
// Column(
|
||||||
children: [
|
// children: [
|
||||||
const Text('-',
|
// const Text('-',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold)),
|
// style: TextStyle(fontWeight: FontWeight.bold)),
|
||||||
Text(
|
// Text(
|
||||||
'获赞',
|
// '获赞',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: Theme.of(context)
|
// fontSize: Theme.of(context)
|
||||||
.textTheme
|
// .textTheme
|
||||||
.labelMedium!
|
// .labelMedium!
|
||||||
.fontSize),
|
// .fontSize),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
if (ctr.ownerMid != ctr.mid) ...[
|
if (ctr.ownerMid != ctr.mid) ...[
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -138,85 +138,9 @@ class _MinePageState extends State<MinePage> {
|
|||||||
_mineController.userInfo.value.uname ?? '点击头像登录',
|
_mineController.userInfo.value.uname ?? '点击头像登录',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/lv/lv${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}.png',
|
|
||||||
height: 10,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text.rich(TextSpan(children: [
|
|
||||||
TextSpan(
|
|
||||||
text: '硬币: ',
|
|
||||||
style:
|
|
||||||
TextStyle(color: Theme.of(context).colorScheme.outline)),
|
|
||||||
TextSpan(
|
|
||||||
text: (_mineController.userInfo.value.money ?? 'pilipala')
|
|
||||||
.toString(),
|
|
||||||
style:
|
|
||||||
TextStyle(color: Theme.of(context).colorScheme.primary)),
|
|
||||||
]))
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 25),
|
const SizedBox(height: 25),
|
||||||
if (_mineController.userInfo.value.levelInfo != null) ...[
|
|
||||||
LayoutBuilder(
|
|
||||||
builder: (context, BoxConstraints box) {
|
|
||||||
LevelInfo levelInfo = _mineController.userInfo.value.levelInfo;
|
|
||||||
return SizedBox(
|
|
||||||
width: box.maxWidth,
|
|
||||||
height: 24,
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Positioned(
|
|
||||||
top: 0,
|
|
||||||
right: 0,
|
|
||||||
bottom: 0,
|
|
||||||
child: Container(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
height: 24,
|
|
||||||
constraints:
|
|
||||||
const BoxConstraints(minWidth: 100), // 设置最小宽度为100
|
|
||||||
width: box.maxWidth *
|
|
||||||
(1 - (levelInfo.currentExp! / levelInfo.nextExp!)),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'${levelInfo.currentExp!}/${levelInfo.nextExp!}',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Theme.of(context).colorScheme.onPrimary,
|
|
||||||
fontSize: 12,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 23,
|
|
||||||
left: 0,
|
|
||||||
bottom: 0,
|
|
||||||
child: Container(
|
|
||||||
width: box.maxWidth *
|
|
||||||
(_mineController
|
|
||||||
.userInfo.value.levelInfo!.currentExp! /
|
|
||||||
_mineController
|
|
||||||
.userInfo.value.levelInfo!.nextExp!),
|
|
||||||
height: 1,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
const SizedBox(height: 30),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 12, right: 12),
|
padding: const EdgeInsets.only(left: 12, right: 12),
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
|
@ -324,15 +324,15 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
// ),
|
// ),
|
||||||
// const SizedBox(height: 7),
|
// const SizedBox(height: 7),
|
||||||
// 点赞收藏转发 布局样式1
|
// 点赞收藏转发 布局样式1
|
||||||
// SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
// padding: const EdgeInsets.only(top: 7, bottom: 7),
|
padding: const EdgeInsets.only(top: 7, bottom: 7),
|
||||||
// scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
// child: actionRow(
|
child: actionRow(
|
||||||
// context,
|
context,
|
||||||
// videoIntroController,
|
videoIntroController,
|
||||||
// videoDetailCtr,
|
videoDetailCtr,
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// 点赞收藏转发 布局样式2
|
// 点赞收藏转发 布局样式2
|
||||||
// actionGrid(context, videoIntroController),
|
// actionGrid(context, videoIntroController),
|
||||||
// 合集
|
// 合集
|
||||||
@ -516,52 +516,52 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
|
|
||||||
Widget actionRow(BuildContext context, videoIntroController, videoDetailCtr) {
|
Widget actionRow(BuildContext context, videoIntroController, videoDetailCtr) {
|
||||||
return Row(children: [
|
return Row(children: [
|
||||||
Obx(
|
// Obx(
|
||||||
() => ActionRowItem(
|
// () => ActionRowItem(
|
||||||
icon: const Icon(FontAwesomeIcons.thumbsUp),
|
// icon: const Icon(FontAwesomeIcons.thumbsUp),
|
||||||
onTap: () => videoIntroController.actionLikeVideo(),
|
// onTap: () => videoIntroController.actionLikeVideo(),
|
||||||
selectStatus: videoIntroController.hasLike.value,
|
// selectStatus: videoIntroController.hasLike.value,
|
||||||
loadingStatus: loadingStatus,
|
// loadingStatus: loadingStatus,
|
||||||
text:
|
// text:
|
||||||
!loadingStatus ? widget.videoDetail!.stat!.like!.toString() : '-',
|
// !loadingStatus ? widget.videoDetail!.stat!.like!.toString() : '-',
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 8),
|
// const SizedBox(width: 8),
|
||||||
Obx(
|
// Obx(
|
||||||
() => ActionRowItem(
|
// () => ActionRowItem(
|
||||||
icon: const Icon(FontAwesomeIcons.b),
|
// icon: const Icon(FontAwesomeIcons.b),
|
||||||
onTap: () => videoIntroController.actionCoinVideo(),
|
// onTap: () => videoIntroController.actionCoinVideo(),
|
||||||
selectStatus: videoIntroController.hasCoin.value,
|
// selectStatus: videoIntroController.hasCoin.value,
|
||||||
loadingStatus: loadingStatus,
|
// loadingStatus: loadingStatus,
|
||||||
text:
|
// text:
|
||||||
!loadingStatus ? widget.videoDetail!.stat!.coin!.toString() : '-',
|
// !loadingStatus ? widget.videoDetail!.stat!.coin!.toString() : '-',
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 8),
|
// const SizedBox(width: 8),
|
||||||
Obx(
|
// Obx(
|
||||||
() => ActionRowItem(
|
// () => ActionRowItem(
|
||||||
icon: const Icon(FontAwesomeIcons.heart),
|
// icon: const Icon(FontAwesomeIcons.heart),
|
||||||
onTap: () => showFavBottomSheet(),
|
// onTap: () => showFavBottomSheet(),
|
||||||
onLongPress: () => showFavBottomSheet(type: 'longPress'),
|
// onLongPress: () => showFavBottomSheet(type: 'longPress'),
|
||||||
selectStatus: videoIntroController.hasFav.value,
|
// selectStatus: videoIntroController.hasFav.value,
|
||||||
loadingStatus: loadingStatus,
|
// loadingStatus: loadingStatus,
|
||||||
text: !loadingStatus
|
// text: !loadingStatus
|
||||||
? widget.videoDetail!.stat!.favorite!.toString()
|
// ? widget.videoDetail!.stat!.favorite!.toString()
|
||||||
: '-',
|
// : '-',
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 8),
|
// const SizedBox(width: 8),
|
||||||
ActionRowItem(
|
// ActionRowItem(
|
||||||
icon: const Icon(FontAwesomeIcons.comment),
|
// icon: const Icon(FontAwesomeIcons.comment),
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
videoDetailCtr.tabCtr.animateTo(1);
|
// videoDetailCtr.tabCtr.animateTo(1);
|
||||||
},
|
// },
|
||||||
selectStatus: false,
|
// selectStatus: false,
|
||||||
loadingStatus: loadingStatus,
|
// loadingStatus: loadingStatus,
|
||||||
text:
|
// text:
|
||||||
!loadingStatus ? widget.videoDetail!.stat!.reply!.toString() : '-',
|
// !loadingStatus ? widget.videoDetail!.stat!.reply!.toString() : '-',
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: 8),
|
// const SizedBox(width: 8),
|
||||||
ActionRowItem(
|
ActionRowItem(
|
||||||
icon: const Icon(FontAwesomeIcons.share),
|
icon: const Icon(FontAwesomeIcons.share),
|
||||||
onTap: () => videoIntroController.actionShareVideo(),
|
onTap: () => videoIntroController.actionShareVideo(),
|
||||||
|
Reference in New Issue
Block a user