fix:我的和设置列表
This commit is contained in:
@@ -120,14 +120,14 @@ class ProfilePage extends ConsumerWidget {
|
||||
// padding: EdgeInsets.zero,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// _SettingRow(
|
||||
// SettingRow(
|
||||
// icon: Icons.download_outlined,
|
||||
// title: '本地导出备份',
|
||||
// trailing: '导出',
|
||||
// onTap: () => _showLocalBackupSheet(context),
|
||||
// ),
|
||||
// const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
// _SettingRow(
|
||||
// SettingRow(
|
||||
// icon: Icons.cloud_outlined,
|
||||
// title: '云备份 · 多端同步',
|
||||
// trailing: loggedIn ? '已登录' : '登录解锁',
|
||||
@@ -141,14 +141,14 @@ class ProfilePage extends ConsumerWidget {
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
children: [
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.tune_outlined,
|
||||
title: '纯度系数管理',
|
||||
trailing: '${settings.purityPresets.length} 项',
|
||||
onTap: () => _showPuritySheet(context, settings),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.percent_outlined,
|
||||
title: '回收折扣设置',
|
||||
trailing:
|
||||
@@ -156,7 +156,7 @@ class ProfilePage extends ConsumerWidget {
|
||||
onTap: () => _showRecycleSheet(context, settings),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.palette_outlined,
|
||||
title: '涨跌颜色',
|
||||
trailing: settings.priceColorMode.label,
|
||||
@@ -173,14 +173,14 @@ class ProfilePage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.currency_yen_outlined,
|
||||
title: '显示币种',
|
||||
trailing: '¥ CNY',
|
||||
onTap: () => _toast(context, '当前仅支持 ¥ CNY'),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.grid_view_outlined,
|
||||
title: '添加桌面小组件',
|
||||
trailing: '占位',
|
||||
@@ -194,14 +194,14 @@ class ProfilePage extends ConsumerWidget {
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
children: [
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.settings,
|
||||
title: '设置',
|
||||
trailing: null,
|
||||
onTap: () => context.push(AppRoutes.settings),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.privacy_tip_outlined,
|
||||
title: '隐私政策 · 用户协议',
|
||||
trailing: null,
|
||||
@@ -213,14 +213,14 @@ class ProfilePage extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.info_outline,
|
||||
title: '免责声明 · 数据来源',
|
||||
trailing: null,
|
||||
onTap: () => _showDisclaimer(context),
|
||||
),
|
||||
const PrototypeDivider(margin: EdgeInsets.zero),
|
||||
_SettingRow(
|
||||
SettingRow(
|
||||
icon: Icons.feedback_outlined,
|
||||
title: '意见反馈 · 关于金值',
|
||||
trailing: null,
|
||||
@@ -352,22 +352,26 @@ class _MenuRow extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _SettingRow extends StatelessWidget {
|
||||
const _SettingRow({
|
||||
class SettingRow extends StatelessWidget {
|
||||
const SettingRow({
|
||||
required this.icon,
|
||||
required this.title,
|
||||
required this.onTap,
|
||||
this.trailing,
|
||||
this.destructive = false,
|
||||
});
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
final String? trailing;
|
||||
final VoidCallback onTap;
|
||||
final bool destructive;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cs = ShadTheme.of(context).colorScheme;
|
||||
final color = destructive ? cs.destructive : cs.foreground;
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
@@ -379,9 +383,10 @@ class _SettingRow extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user