refactor(client): 往来/设备/登录/关于颜色迁移到 context.tokens

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-25 00:20:11 +08:00
parent 8ef2424090
commit 6570ac792c
6 changed files with 99 additions and 97 deletions
+8 -8
View File
@@ -8,7 +8,7 @@ import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../core/config/app_config.dart';
import '../../core/config/app_info.dart';
import '../../core/theme/app_theme.dart';
import '../../core/theme/context_tokens.dart';
import '../../core/update/app_updater.dart';
import '../../core/utils/dialog_util.dart';
import '../../providers/feedback_provider.dart';
@@ -42,7 +42,7 @@ class _AboutScreenState extends ConsumerState<AboutScreen> {
_AboutRow(
label: '最新版本',
value: 'v${updateInfo.latestVersion}',
valueColor: AppTheme.success,
valueColor: context.tokens.success,
trailing: TextButton(
onPressed: () => startInAppUpdate(context, updateInfo),
child: const Text('立即更新'),
@@ -52,7 +52,7 @@ class _AboutScreenState extends ConsumerState<AboutScreen> {
_AboutRow(
label: '最新版本',
value: updateInfo != null ? '已是最新' : '检查中…',
valueColor: AppTheme.textSecondary,
valueColor: context.tokens.muted,
trailing: TextButton(
onPressed: () async {
final messenger = ScaffoldMessenger.of(context);
@@ -469,10 +469,10 @@ class _AboutSection extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title,
style: const TextStyle(
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: AppTheme.primaryDark)),
color: context.tokens.primaryDark)),
const Divider(height: 24),
...children,
],
@@ -504,14 +504,14 @@ class _AboutRow extends StatelessWidget {
SizedBox(
width: 88,
child: Text(label,
style: const TextStyle(
fontSize: 13, color: AppTheme.textSecondary)),
style: TextStyle(
fontSize: 13, color: context.tokens.muted)),
),
Expanded(
child: Text(value,
style: TextStyle(
fontSize: 13,
color: valueColor ?? AppTheme.textPrimary,
color: valueColor ?? context.tokens.text,
fontWeight: FontWeight.w500)),
),
if (trailing != null) trailing!,