refactor: 我的页删除用户卡片,会员卡直接置顶展示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 16:40:08 +08:00
co-authored by Claude Opus 4.7
parent 8e38370b78
commit 4828072299
-27
View File
@@ -76,39 +76,12 @@ class _MinePageState extends ConsumerState<MinePage> {
@override
Widget build(BuildContext context) {
final member = ref.watch(memberProvider);
final auth = ref.watch(authProvider).value;
final scheme = Theme.of(context).colorScheme;
final rawName = auth?.name?.trim() ?? '';
final name = rawName.isEmpty ? '我的' : rawName;
return Scaffold(
appBar: AppBar(title: const Text('我的')),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
Card(
color: scheme.primaryContainer.withValues(alpha: 0.4),
child: ListTile(
leading: CircleAvatar(
backgroundColor: scheme.primary,
child: Text(
name.characters.first,
style: const TextStyle(color: Colors.white),
),
),
title: Text(name,
style: const TextStyle(
fontSize: 17, fontWeight: FontWeight.bold)),
subtitle: Text(
member.value?.isVip == true
? '形象会员 · ${member.value!.planName} · 有效期至 ${member.value!.expireAt}'
: '普通用户',
style: const TextStyle(fontSize: 12),
),
),
),
const SizedBox(height: 12),
_MemberCard(
member: member,
isIOS: _isIOS,