mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: mine page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -35,231 +35,259 @@ class _MinePageState extends State<MinePage> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget get _header => FittedBox(
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/logo/logo_android_2.png',
|
||||||
|
width: 35,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
Text(
|
||||||
|
'PiliPalaX',
|
||||||
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 30),
|
||||||
|
IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize:
|
||||||
|
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
||||||
|
),
|
||||||
|
tooltip: "${MineController.anonymity ? '退出' : '进入'}无痕模式",
|
||||||
|
onPressed: () {
|
||||||
|
MineController.onChangeAnonymity(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
MineController.anonymity
|
||||||
|
? MdiIcons.incognito
|
||||||
|
: MdiIcons.incognitoOff,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
constraints: const BoxConstraints(),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize:
|
||||||
|
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
||||||
|
),
|
||||||
|
tooltip: '切换至${switch (mineController.nextThemeType) {
|
||||||
|
ThemeType.light => '浅色',
|
||||||
|
ThemeType.dark => '深色',
|
||||||
|
ThemeType.system => '跟随系统',
|
||||||
|
}}主题',
|
||||||
|
onPressed: mineController.onChangeTheme,
|
||||||
|
icon: Icon(
|
||||||
|
switch (mineController.themeType.value) {
|
||||||
|
ThemeType.light => MdiIcons.weatherSunny,
|
||||||
|
ThemeType.dark => MdiIcons.weatherNight,
|
||||||
|
ThemeType.system => MdiIcons.themeLightDark,
|
||||||
|
},
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
iconSize: 40.0,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
constraints: const BoxConstraints(),
|
||||||
|
style: const ButtonStyle(
|
||||||
|
tapTargetSize:
|
||||||
|
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
||||||
|
),
|
||||||
|
tooltip: '设置',
|
||||||
|
onPressed: () => {
|
||||||
|
Get.back(),
|
||||||
|
Get.toNamed('/setting', preventDuplicates: false),
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
MdiIcons.cogs,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// 宽度以最长的行为准,便于两端对齐
|
|
||||||
return IntrinsicWidth(
|
return IntrinsicWidth(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
children: [
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
const SizedBox(height: 8),
|
||||||
children: [
|
_header,
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 10),
|
||||||
Row(
|
FutureBuilder(
|
||||||
mainAxisSize: MainAxisSize.min,
|
future: _futureBuilderFuture,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
builder: (context, snapshot) {
|
||||||
children: [
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
const SizedBox(width: 12),
|
if (snapshot.data == null || !snapshot.data['status']) {
|
||||||
Image.asset(
|
return userInfoBuild(mineController, context);
|
||||||
'assets/images/logo/logo_android_2.png',
|
}
|
||||||
width: 35,
|
return Obx(() => userInfoBuild(mineController, context));
|
||||||
),
|
} else {
|
||||||
const SizedBox(width: 5),
|
|
||||||
Text(
|
|
||||||
'PiliPalaX',
|
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
|
||||||
),
|
|
||||||
const SizedBox(width: 30),
|
|
||||||
IconButton(
|
|
||||||
iconSize: 40.0,
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
// constraints: const BoxConstraints(),
|
|
||||||
style: const ButtonStyle(
|
|
||||||
tapTargetSize:
|
|
||||||
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
|
||||||
),
|
|
||||||
tooltip: "${MineController.anonymity ? '退出' : '进入'}无痕模式",
|
|
||||||
onPressed: () {
|
|
||||||
MineController.onChangeAnonymity(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
MineController.anonymity
|
|
||||||
? MdiIcons.incognito
|
|
||||||
: MdiIcons.incognitoOff,
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
iconSize: 40.0,
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
constraints: const BoxConstraints(),
|
|
||||||
style: const ButtonStyle(
|
|
||||||
tapTargetSize:
|
|
||||||
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
|
||||||
),
|
|
||||||
tooltip: '切换至${switch (mineController.nextThemeType) {
|
|
||||||
ThemeType.light => '浅色',
|
|
||||||
ThemeType.dark => '深色',
|
|
||||||
ThemeType.system => '跟随系统',
|
|
||||||
}}主题',
|
|
||||||
onPressed: mineController.onChangeTheme,
|
|
||||||
icon: Icon(
|
|
||||||
switch (mineController.themeType.value) {
|
|
||||||
ThemeType.light => MdiIcons.weatherSunny,
|
|
||||||
ThemeType.dark => MdiIcons.weatherNight,
|
|
||||||
ThemeType.system => MdiIcons.themeLightDark,
|
|
||||||
},
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
iconSize: 40.0,
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
constraints: const BoxConstraints(),
|
|
||||||
style: const ButtonStyle(
|
|
||||||
tapTargetSize:
|
|
||||||
MaterialTapTargetSize.shrinkWrap, // the '2023' part
|
|
||||||
),
|
|
||||||
tooltip: '设置',
|
|
||||||
onPressed: () => {
|
|
||||||
Get.back(),
|
|
||||||
Get.toNamed('/setting', preventDuplicates: false),
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
MdiIcons.cogs,
|
|
||||||
size: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
]),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
FutureBuilder(
|
|
||||||
future: _futureBuilderFuture,
|
|
||||||
builder: (context, snapshot) {
|
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
|
||||||
if (snapshot.data == null || !snapshot.data['status']) {
|
|
||||||
return userInfoBuild(mineController, context);
|
return userInfoBuild(mineController, context);
|
||||||
}
|
}
|
||||||
return Obx(() => userInfoBuild(mineController, context));
|
},
|
||||||
} else {
|
),
|
||||||
return userInfoBuild(mineController, context);
|
],
|
||||||
}
|
),
|
||||||
},
|
);
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget userInfoBuild(_mineController, context) {
|
Widget userInfoBuild(_mineController, context) {
|
||||||
LevelInfo? levelInfo = _mineController.userInfo.value.levelInfo;
|
LevelInfo? levelInfo = _mineController.userInfo.value.levelInfo;
|
||||||
TextStyle style = TextStyle(
|
TextStyle style = TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.titleMedium!.fontSize,
|
fontSize: Theme.of(context).textTheme.titleMedium!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
fontWeight: FontWeight.bold);
|
fontWeight: FontWeight.bold,
|
||||||
return Column(mainAxisSize: MainAxisSize.min, children: [
|
);
|
||||||
Row(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(width: 20),
|
Row(
|
||||||
GestureDetector(
|
mainAxisSize: MainAxisSize.min,
|
||||||
onTap: () => _mineController.onLogin(),
|
children: [
|
||||||
child: ClipOval(
|
const SizedBox(width: 20),
|
||||||
child: Container(
|
GestureDetector(
|
||||||
width: 70,
|
onTap: _mineController.onLogin,
|
||||||
height: 70,
|
child: ClipOval(
|
||||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
child: Container(
|
||||||
child: Center(
|
width: 70,
|
||||||
child: _mineController.userInfo.value.face != null
|
height: 70,
|
||||||
? NetworkImgLayer(
|
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||||
src: _mineController.userInfo.value.face,
|
child: Center(
|
||||||
semanticsLabel: '头像',
|
child: _mineController.userInfo.value.face != null
|
||||||
width: 70,
|
? NetworkImgLayer(
|
||||||
height: 70)
|
src: _mineController.userInfo.value.face,
|
||||||
: Image.asset(
|
semanticsLabel: '头像',
|
||||||
'assets/images/noface.jpeg',
|
width: 70,
|
||||||
semanticLabel: "默认头像",
|
height: 70,
|
||||||
),
|
)
|
||||||
|
: Image.asset(
|
||||||
|
'assets/images/noface.jpeg',
|
||||||
|
semanticLabel: "默认头像",
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(width: 16),
|
||||||
const SizedBox(width: 16),
|
Expanded(
|
||||||
IntrinsicWidth(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
FittedBox(
|
||||||
_mineController.userInfo.value.uname ?? '点击头像登录',
|
child: Row(
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
_mineController.userInfo.value.uname ?? '点击头像登录',
|
||||||
|
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,
|
||||||
|
semanticLabel:
|
||||||
|
'等级:${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(height: 8),
|
||||||
Image.asset(
|
FittedBox(
|
||||||
'assets/images/lv/lv${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}.png',
|
child: Text.rich(
|
||||||
height: 10,
|
TextSpan(
|
||||||
semanticLabel:
|
children: [
|
||||||
'等级:${_mineController.userInfo.value.levelInfo != null ? _mineController.userInfo.value.levelInfo!.currentLevel : '0'}',
|
TextSpan(
|
||||||
|
text: '硬币 ',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize,
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: (_mineController.userInfo.value.money ?? '-')
|
||||||
|
.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: " 经验 ",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize,
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: "${levelInfo?.currentExp ?? '-'}",
|
||||||
|
semanticsLabel: "当前${levelInfo?.currentExp ?? '-'}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: "/${levelInfo?.nextExp ?? '-'}",
|
||||||
|
semanticsLabel: "升级需${levelInfo?.nextExp ?? '-'}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize,
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
LinearProgressIndicator(
|
||||||
|
minHeight: 2,
|
||||||
|
value: levelInfo != null
|
||||||
|
? (levelInfo.currentExp! / levelInfo.nextExp!)
|
||||||
|
: 0,
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).colorScheme.inversePrimary,
|
||||||
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
Theme.of(context).colorScheme.primary),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
),
|
||||||
Text.rich(TextSpan(children: [
|
const SizedBox(width: 20),
|
||||||
TextSpan(
|
],
|
||||||
text: '硬币 ',
|
),
|
||||||
style: TextStyle(
|
const SizedBox(height: 10),
|
||||||
fontSize:
|
SizedBox(
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
|
||||||
color: Theme.of(context).colorScheme.outline)),
|
|
||||||
TextSpan(
|
|
||||||
text: (_mineController.userInfo.value.money ?? '-')
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Theme.of(context).colorScheme.primary)),
|
|
||||||
TextSpan(
|
|
||||||
text: " 经验 ",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
|
||||||
color: Theme.of(context).colorScheme.outline)),
|
|
||||||
TextSpan(
|
|
||||||
text: "${levelInfo?.currentExp ?? '-'}",
|
|
||||||
semanticsLabel: "当前${levelInfo?.currentExp ?? '-'}",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Theme.of(context).colorScheme.primary)),
|
|
||||||
TextSpan(
|
|
||||||
text: "/${levelInfo?.nextExp ?? '-'}",
|
|
||||||
semanticsLabel: "升级需${levelInfo?.nextExp ?? '-'}",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
|
||||||
color: Theme.of(context).colorScheme.outline)),
|
|
||||||
])),
|
|
||||||
// const SizedBox(height: 4),
|
|
||||||
// Text.rich(TextSpan(children: [
|
|
||||||
// ])),
|
|
||||||
// Text.rich(
|
|
||||||
// textAlign: TextAlign.right,
|
|
||||||
// TextSpan(children: [
|
|
||||||
//
|
|
||||||
// ])),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
LinearProgressIndicator(
|
|
||||||
minHeight: 2,
|
|
||||||
value: levelInfo != null
|
|
||||||
? (levelInfo.currentExp! / levelInfo.nextExp!)
|
|
||||||
: 0,
|
|
||||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
Theme.of(context).colorScheme.primary),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
const SizedBox(width: 20),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Container(
|
|
||||||
width: 240,
|
width: 240,
|
||||||
height: 100,
|
height: 100,
|
||||||
child: GridView.count(
|
child: GridView.count(
|
||||||
@@ -268,7 +296,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => _mineController.pushDynamic(),
|
onTap: _mineController.pushDynamic,
|
||||||
borderRadius: StyleString.mdRadius,
|
borderRadius: StyleString.mdRadius,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -280,12 +308,13 @@ class _MinePageState extends State<MinePage> {
|
|||||||
return ScaleTransition(scale: animation, child: child);
|
return ScaleTransition(scale: animation, child: child);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
(_mineController.userStat.value.dynamicCount ?? '-')
|
(_mineController.userStat.value.dynamicCount ?? '-')
|
||||||
.toString(),
|
.toString(),
|
||||||
key: ValueKey<String>(_mineController
|
key: ValueKey<String>(_mineController
|
||||||
.userStat.value.dynamicCount
|
.userStat.value.dynamicCount
|
||||||
.toString()),
|
.toString()),
|
||||||
style: style),
|
style: style,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
@@ -296,7 +325,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => _mineController.pushFollow(),
|
onTap: _mineController.pushFollow,
|
||||||
borderRadius: StyleString.mdRadius,
|
borderRadius: StyleString.mdRadius,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -308,12 +337,13 @@ class _MinePageState extends State<MinePage> {
|
|||||||
return ScaleTransition(scale: animation, child: child);
|
return ScaleTransition(scale: animation, child: child);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
(_mineController.userStat.value.following ?? '-')
|
(_mineController.userStat.value.following ?? '-')
|
||||||
.toString(),
|
.toString(),
|
||||||
key: ValueKey<String>(_mineController
|
key: ValueKey<String>(_mineController
|
||||||
.userStat.value.following
|
.userStat.value.following
|
||||||
.toString()),
|
.toString()),
|
||||||
style: style),
|
style: style,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
@@ -324,7 +354,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => _mineController.pushFans(),
|
onTap: _mineController.pushFans,
|
||||||
borderRadius: StyleString.mdRadius,
|
borderRadius: StyleString.mdRadius,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -337,12 +367,12 @@ class _MinePageState extends State<MinePage> {
|
|||||||
return ScaleTransition(scale: animation, child: child);
|
return ScaleTransition(scale: animation, child: child);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
(_mineController.userStat.value.follower ?? '-')
|
(_mineController.userStat.value.follower ?? '-')
|
||||||
.toString(),
|
.toString(),
|
||||||
key: ValueKey<String>(_mineController
|
key: ValueKey<String>(
|
||||||
.userStat.value.follower
|
_mineController.userStat.value.follower.toString()),
|
||||||
.toString()),
|
style: style,
|
||||||
style: style),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
@@ -353,39 +383,9 @@ class _MinePageState extends State<MinePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ActionItem extends StatelessWidget {
|
|
||||||
final Icon? icon;
|
|
||||||
final Function? onTap;
|
|
||||||
final String? text;
|
|
||||||
|
|
||||||
const ActionItem({
|
|
||||||
super.key,
|
|
||||||
this.icon,
|
|
||||||
this.onTap,
|
|
||||||
this.text,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
borderRadius: StyleString.mdRadius,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(icon!.icon!),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
text!,
|
|
||||||
style: Theme.of(context).textTheme.labelMedium,
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user