release
This commit is contained in:
@@ -353,84 +353,6 @@ class _ProfilePageState extends State<ProfilePage>
|
|||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 个人信息卡片
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
padding: const EdgeInsets.all(20),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.black.withValues(alpha: 0.08),
|
|
||||||
blurRadius: 10,
|
|
||||||
offset: const Offset(0, 2),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
// === 卡片标题 ===
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.person_outline,
|
|
||||||
color: AppConstants.primaryColor,
|
|
||||||
size: 20,
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Text(
|
|
||||||
'统计',
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppConstants.primaryColor,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(
|
|
||||||
_isStatsHidden
|
|
||||||
? Icons.visibility_off_outlined
|
|
||||||
: Icons.visibility_outlined,
|
|
||||||
color: Colors.grey[600],
|
|
||||||
size: 20,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() {
|
|
||||||
_isStatsHidden = !_isStatsHidden;
|
|
||||||
});
|
|
||||||
HapticFeedback.lightImpact();
|
|
||||||
},
|
|
||||||
tooltip: _isStatsHidden ? '显示数据' : '隐藏数据',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
// === 信息列表 ===
|
|
||||||
if (!_isStatsHidden) ...[
|
|
||||||
_buildInfoItem('今日浏览', '$_todayViews 条'),
|
|
||||||
_buildInfoItem('本周浏览', '$_weekViews 条'),
|
|
||||||
_buildInfoItem('已用', '$_useDays 天'),
|
|
||||||
_buildInfoItem('数据', _dataSize),
|
|
||||||
_buildInfoItem('笔记', '$_noteCount 个'),
|
|
||||||
_buildInfoItem('今日答题', '$_todayQuestions 题'),
|
|
||||||
_buildInfoItem('今日点赞', '$_todayLikes 个'),
|
|
||||||
] else
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
||||||
child: Text(
|
|
||||||
'数据已隐藏',
|
|
||||||
style: TextStyle(color: Colors.grey[500], fontSize: 14),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
// === 互动统计卡片 ===
|
// === 互动统计卡片 ===
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
@@ -512,6 +434,84 @@ class _ProfilePageState extends State<ProfilePage>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
// 个人信息卡片
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black.withValues(alpha: 0.08),
|
||||||
|
blurRadius: 10,
|
||||||
|
offset: const Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// === 卡片标题 ===
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.person_outline,
|
||||||
|
color: AppConstants.primaryColor,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
'统计',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppConstants.primaryColor,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
_isStatsHidden
|
||||||
|
? Icons.visibility_off_outlined
|
||||||
|
: Icons.visibility_outlined,
|
||||||
|
color: Colors.grey[600],
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_isStatsHidden = !_isStatsHidden;
|
||||||
|
});
|
||||||
|
HapticFeedback.lightImpact();
|
||||||
|
},
|
||||||
|
tooltip: _isStatsHidden ? '显示数据' : '隐藏数据',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
// === 信息列表 ===
|
||||||
|
if (!_isStatsHidden) ...[
|
||||||
|
_buildInfoItem('今日浏览', '$_todayViews 条'),
|
||||||
|
_buildInfoItem('今日点赞', '$_todayLikes 个'),
|
||||||
|
_buildInfoItem('今日答题', '$_todayQuestions 题'),
|
||||||
|
_buildInfoItem('本周浏览', '$_weekViews 条'),
|
||||||
|
_buildInfoItem('数据', _dataSize),
|
||||||
|
_buildInfoItem('笔记', '$_noteCount 个'),
|
||||||
|
_buildInfoItem('已用', '$_useDays 天'),
|
||||||
|
] else
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
child: Text(
|
||||||
|
'数据已隐藏',
|
||||||
|
style: TextStyle(color: Colors.grey[500], fontSize: 14),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user