fix:免责声明

This commit is contained in:
jingyun
2026-06-23 11:07:12 +08:00
parent 7d571e22eb
commit 2e10f01496
3 changed files with 91 additions and 82 deletions
@@ -175,7 +175,7 @@ class SettingsPage extends HookConsumerWidget {
SettingRow(
icon: FlutterRemix.alert_line,
title: '免责声明',
onTap: () => _showDisclaimerSheet(context),
onTap: () => context.push(AppRoutes.profileDisclaimer),
),
],
),
@@ -362,63 +362,6 @@ class SettingsPage extends HookConsumerWidget {
);
}
Future<void> _showDisclaimerSheet(BuildContext context) async {
final cs = ShadTheme.of(context).colorScheme;
await showModalBottomSheet<void>(
context: context,
backgroundColor: cs.card,
barrierColor: Colors.black.withValues(alpha: 0.5),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(Spacing.radiusCard),
),
),
builder: (ctx) => SafeArea(
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 8, 20, 20),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Container(
width: 38,
height: 4,
margin: const EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: cs.border,
borderRadius: BorderRadius.circular(9999),
),
),
),
Text(
'免责声明',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w700,
color: cs.foreground,
),
),
const SizedBox(height: 8),
Text(
'金值提供的价格、资讯和估值均为本地 mock 数据,仅用于产品原型验证,不构成投资建议。',
style: TextStyle(
fontSize: 13,
height: 1.55,
color: cs.mutedForeground,
),
),
const SizedBox(height: 18),
_SheetPrimaryButton(
label: '知道了',
onTap: () => Navigator.of(ctx).pop(),
),
],
),
),
),
);
}
}
class _Section extends StatelessWidget {