diff --git a/CHANGELOG.md b/CHANGELOG.md index c6ab84d5..8851845b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ *** +## [v16.27.0] - 2026-05-24 + +### 重构 — AppTypography Token化 + 笔记数据源统一 + UI修复 + +- 🔧 `app_typography.dart`: 从静态常量类重构为 ThemeExtension + 静态实例模式 + - 新增 `instance` 全局字段,主题构建时自动更新 + - 静态 getter 委托给 instance,自动应用 fontScale/fontWeight/fontFamily + - 类似 iOS Dynamic Type,切换字号/字重即时生效,无需 context + - 保留 `of(context)` 方法用于精确主题响应场景 +- 🔧 `app_theme.dart`: 注册 AppTypography 到 ThemeExtension,构建时更新 instance +- 🔧 `app.dart`: 移除 textScaler 和 DefaultTextStyle hack(AppTypography 已内置处理) +- 🐛 `profile_page.dart`: 隐藏按钮整合为一个,放在统计栏右上角(眼睛图标) +- 🐛 `home_refresh_indicator.dart`: 下拉阈值调回合理值(40px, 0.3触发) +- 🐛 `user_stats_bar.dart`: 笔记数量统一使用 noteListProvider.total +- 🐛 `learning_center_page.dart`: 笔记数量统一使用 noteListProvider.total +- 🐛 `note_provider.dart`: deleteAllNotes 修复 total 未重置为0的bug +- 🔧 `font_widgets.dart`: 隐藏ZIP导入按钮,注释TODO后续开发 + +*** + ## [v16.26.0] - 2026-05-24 ### Bug修复 — 统一笔记数量数据源 + deleteAllNotes修复 diff --git a/lib/core/services/auth/permission_service.dart b/lib/core/services/auth/permission_service.dart index 48b35f03..f92b64ba 100644 --- a/lib/core/services/auth/permission_service.dart +++ b/lib/core/services/auth/permission_service.dart @@ -85,7 +85,6 @@ enum AppPermission { CupertinoIcons.location_fill, '用于获取天气信息和节气提醒,仅使用粗略位置(城市级),不获取精确位置,不会后台追踪。', Color(0xFF007AFF), - group: PermissionGroup.optional, usageScenes: ['天气信息 — 当前城市天气', '节气提醒 — 当地节气推送'], ), bluetooth( @@ -94,7 +93,6 @@ enum AppPermission { CupertinoIcons.bluetooth, '用于文件传输助手的蓝牙配对和设备发现,仅在您使用文件传输功能时请求。', Color(0xFF5AC8FA), - group: PermissionGroup.optional, usageScenes: ['文件传输 — 蓝牙配对', '设备发现 — 附近设备搜索'], ), nearbyDevices( @@ -103,7 +101,6 @@ enum AppPermission { CupertinoIcons.antenna_radiowaves_left_right, '用于文件传输助手的局域网设备发现和连接,仅在您使用文件传输功能时请求。', Color(0xFF64D2FF), - group: PermissionGroup.optional, usageScenes: ['文件传输 — 局域网发现', '设备连接 — WiFi直连'], ), microphone( @@ -112,7 +109,6 @@ enum AppPermission { CupertinoIcons.mic_fill, '用于语音朗读句子、语音搜索、AI对话语音输入。仅在您主动使用语音功能时请求,不会后台录音。', Color(0xFFFF3B30), - group: PermissionGroup.optional, usageScenes: ['语音朗读 — 朗读句子', '语音搜索 — 语音输入关键词', 'AI对话 — 语音输入消息'], ), storage( @@ -121,7 +117,6 @@ enum AppPermission { CupertinoIcons.folder_fill, '用于保存编辑的卡片、壁纸到本地,导出字体文件和数据。Android 12及以下版本需要此权限。', Color(0xFFFF9500), - group: PermissionGroup.optional, usageScenes: ['保存卡片 — 导出到本地', '字体管理 — 下载字体文件', '数据导出 — 导出用户数据'], ), network( diff --git a/lib/core/theme/app_theme.dart b/lib/core/theme/app_theme.dart index e0c08fd8..d16676ef 100644 --- a/lib/core/theme/app_theme.dart +++ b/lib/core/theme/app_theme.dart @@ -1,4 +1,4 @@ -/// ============================================================ +/// ============================================================ /// 闲言APP — 主题系统 /// 创建时间: 2026-04-20 /// 更新时间: 2026-05-24 @@ -555,6 +555,8 @@ class AppTheme { fontFamily: extension.fontFamily, ); + AppTypography.instance = typo; + return ThemeData( useMaterial3: true, colorScheme: colorScheme, @@ -562,7 +564,7 @@ class AppTheme { // ---- 字体 ---- fontFamily: extension.fontFamily, - textTheme: _buildTextTheme(colorScheme, typo), + textTheme: _buildTextTheme(colorScheme), // ---- Cupertino 交互 ---- cupertinoOverrideTheme: CupertinoThemeData( @@ -571,16 +573,22 @@ class AppTheme { barBackgroundColor: extension.bgElevated, textTheme: CupertinoTextThemeData( primaryColor: colorScheme.primary, - textStyle: typo.body.copyWith(color: colorScheme.onSurface), - navTitleTextStyle: typo.title3.copyWith(color: colorScheme.onSurface), - navLargeTitleTextStyle: typo.title1.copyWith( + textStyle: AppTypography.body.copyWith(color: colorScheme.onSurface), + navTitleTextStyle: AppTypography.title3.copyWith( color: colorScheme.onSurface, ), - navActionTextStyle: typo.subhead.copyWith(color: colorScheme.primary), - actionTextStyle: typo.subhead.copyWith(color: colorScheme.primary), - tabLabelTextStyle: typo.caption1, - pickerTextStyle: typo.body, - dateTimePickerTextStyle: typo.body, + navLargeTitleTextStyle: AppTypography.title1.copyWith( + color: colorScheme.onSurface, + ), + navActionTextStyle: AppTypography.subhead.copyWith( + color: colorScheme.primary, + ), + actionTextStyle: AppTypography.subhead.copyWith( + color: colorScheme.primary, + ), + tabLabelTextStyle: AppTypography.caption1, + pickerTextStyle: AppTypography.body, + dateTimePickerTextStyle: AppTypography.body, ), ), @@ -594,7 +602,9 @@ class AppTheme { centerTitle: true, backgroundColor: colorScheme.surface.withValues(alpha: 0.85), foregroundColor: colorScheme.onSurface, - titleTextStyle: typo.title3.copyWith(color: colorScheme.onSurface), + titleTextStyle: AppTypography.title3.copyWith( + color: colorScheme.onSurface, + ), ), // ---- 底部导航栏 ---- @@ -640,7 +650,7 @@ class AppTheme { borderRadius: AppRadius.mdBorder, borderSide: BorderSide(color: colorScheme.primary, width: 1.5), ), - hintStyle: typo.body.copyWith(color: extension.textHint), + hintStyle: AppTypography.body.copyWith(color: extension.textHint), ), // ---- 按钮 ---- @@ -648,7 +658,7 @@ class AppTheme { style: FilledButton.styleFrom( backgroundColor: colorScheme.primary, foregroundColor: colorScheme.onPrimary, - textStyle: typo.callout, + textStyle: AppTypography.callout, shape: RoundedRectangleBorder(borderRadius: AppRadius.mdBorder), minimumSize: const Size(double.infinity, 48), ), @@ -657,7 +667,7 @@ class AppTheme { outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: colorScheme.primary, - textStyle: typo.callout, + textStyle: AppTypography.callout, shape: RoundedRectangleBorder(borderRadius: AppRadius.mdBorder), side: BorderSide(color: colorScheme.primary, width: 1.2), minimumSize: const Size(double.infinity, 48), @@ -667,7 +677,9 @@ class AppTheme { textButtonTheme: TextButtonThemeData( style: TextButton.styleFrom( foregroundColor: colorScheme.primary, - textStyle: typo.subhead.copyWith(fontWeight: FontWeight.w500), + textStyle: AppTypography.subhead.copyWith( + fontWeight: FontWeight.w500, + ), ), ), @@ -699,7 +711,9 @@ class AppTheme { chipTheme: ChipThemeData( backgroundColor: extension.bgSecondary, selectedColor: colorScheme.primary.withValues(alpha: 0.15), - labelStyle: typo.caption1.copyWith(color: colorScheme.onSurface), + labelStyle: AppTypography.caption1.copyWith( + color: colorScheme.onSurface, + ), shape: RoundedRectangleBorder(borderRadius: AppRadius.fullBorder), side: BorderSide.none, padding: const EdgeInsets.symmetric( @@ -731,22 +745,29 @@ class AppTheme { // TextTheme // ============================================================ - static TextTheme _buildTextTheme( - ColorScheme colorScheme, - AppTypography typo, - ) { + static TextTheme _buildTextTheme(ColorScheme colorScheme) { return TextTheme( - displayLarge: typo.display.copyWith(color: colorScheme.onSurface), - headlineLarge: typo.title1.copyWith(color: colorScheme.onSurface), - headlineMedium: typo.title2.copyWith(color: colorScheme.onSurface), - headlineSmall: typo.title3.copyWith(color: colorScheme.onSurface), - titleLarge: typo.headline.copyWith(color: colorScheme.onSurface), - bodyLarge: typo.body.copyWith(color: colorScheme.onSurface), - bodyMedium: typo.subhead.copyWith(color: colorScheme.onSurface), - bodySmall: typo.footnote.copyWith(color: colorScheme.onSurface), - labelLarge: typo.callout.copyWith(color: colorScheme.onSurface), - labelMedium: typo.caption1.copyWith(color: colorScheme.onSurface), - labelSmall: typo.caption2.copyWith(color: colorScheme.onSurface), + displayLarge: AppTypography.display.copyWith( + color: colorScheme.onSurface, + ), + headlineLarge: AppTypography.title1.copyWith( + color: colorScheme.onSurface, + ), + headlineMedium: AppTypography.title2.copyWith( + color: colorScheme.onSurface, + ), + headlineSmall: AppTypography.title3.copyWith( + color: colorScheme.onSurface, + ), + titleLarge: AppTypography.headline.copyWith(color: colorScheme.onSurface), + bodyLarge: AppTypography.body.copyWith(color: colorScheme.onSurface), + bodyMedium: AppTypography.subhead.copyWith(color: colorScheme.onSurface), + bodySmall: AppTypography.footnote.copyWith(color: colorScheme.onSurface), + labelLarge: AppTypography.callout.copyWith(color: colorScheme.onSurface), + labelMedium: AppTypography.caption1.copyWith( + color: colorScheme.onSurface, + ), + labelSmall: AppTypography.caption2.copyWith(color: colorScheme.onSurface), ); } } diff --git a/lib/core/theme/app_typography.dart b/lib/core/theme/app_typography.dart index 4f8815d1..cb3a939a 100644 --- a/lib/core/theme/app_typography.dart +++ b/lib/core/theme/app_typography.dart @@ -1,27 +1,33 @@ /// ============================================================ -/// 闲言APP — 字体令牌 (ThemeExtension) +/// 闲言APP — 字体令牌 (ThemeExtension + 静态实例) /// 创建时间: 2026-04-20 /// 更新时间: 2026-05-24 /// 作用: 统一字体大小/字重定义,响应 fontScale/fontWeight 变化 -/// 上次更新: 从静态常量类重构为 ThemeExtension,支持动态字体缩放与字重调整 +/// 上次更新: 静态 getter 委托给 instance,无需 context 也能响应主题变化 /// ============================================================ import 'dart:ui'; import 'package:flutter/material.dart'; -/// 字体令牌 — ThemeExtension 实现 +/// 字体令牌 — ThemeExtension + 静态实例 /// -/// 通过 [of] 获取当前主题下的 AppTypography 实例, -/// 自动应用 fontScale / fontWeight / fontFamily, -/// 无需手动乘算或覆盖字重。 +/// 访问方式: +/// - `AppTypography.xxx` — 静态 getter,委托给 [instance],无需 context +/// - `AppTypography.of(context)` — 从 ThemeExtension 获取完整实例 +/// +/// 静态 getter 自动应用 fontScale / fontWeight / fontFamily, +/// 类似 iOS Dynamic Type,切换字号/字重即时生效。 class AppTypography extends ThemeExtension { - const AppTypography({ + AppTypography({ this.fontScale = 1.0, this.fontWeight = FontWeight.w400, this.fontFamily = 'Inter', }); + /// 全局实例 — 主题构建时自动更新 + static AppTypography instance = AppTypography(); + /// 字体缩放倍率 final double fontScale; @@ -31,44 +37,22 @@ class AppTypography extends ThemeExtension { /// 字体族 final String fontFamily; - // ---- 基准字号 (静态常量,供无 context 场景使用) ---- + // ---- 基准字号 (静态常量) ---- - /// 大标题 (启动页品牌字) 34sp Bold static const double fontDisplay = 34.0; - - /// 页面主标题 28sp Bold static const double fontTitle1 = 28.0; - - /// 区块标题 22sp Bold static const double fontTitle2 = 22.0; - - /// 导航栏标题 20sp Semibold static const double fontTitle3 = 20.0; - - /// 列表标题 18sp Semibold static const double fontHeadline = 18.0; - - /// 正文内容 16sp Regular static const double fontBody = 16.0; - - /// 强调文字 16sp Medium static const double fontCallout = 16.0; - - /// 辅助说明 14sp Regular static const double fontSubhead = 14.0; - - /// 脚注 13sp Regular static const double fontFootnote = 13.0; - - /// 标签/提示 12sp Regular static const double fontCaption1 = 12.0; - - /// 极小文字 11sp Regular static const double fontCaption2 = 11.0; // ---- 字重调整 ---- - /// 根据基准字重偏移量调整目标字重 FontWeight _adjustWeight(FontWeight target) { final diff = fontWeight.value - FontWeight.w400.value; final newValue = (target.value + diff).clamp(100, 900); @@ -76,84 +60,73 @@ class AppTypography extends ThemeExtension { return FontWeight.values[idx.clamp(0, 8)]; } - // ---- TextStyle 实例方法 (自动应用 fontScale + fontWeight) ---- + // ---- TextStyle 静态 getter (委托给 instance,无需 context) ---- - /// 大标题 34sp Bold - TextStyle get display => TextStyle( - fontSize: fontDisplay * fontScale, - fontWeight: _adjustWeight(FontWeight.bold), - fontFamily: fontFamily, - ); + static TextStyle get display => TextStyle( + fontSize: fontDisplay * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.bold), + fontFamily: instance.fontFamily, + ); - /// 页面主标题 28sp Bold - TextStyle get title1 => TextStyle( - fontSize: fontTitle1 * fontScale, - fontWeight: _adjustWeight(FontWeight.bold), - fontFamily: fontFamily, - ); + static TextStyle get title1 => TextStyle( + fontSize: fontTitle1 * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.bold), + fontFamily: instance.fontFamily, + ); - /// 区块标题 22sp Bold - TextStyle get title2 => TextStyle( - fontSize: fontTitle2 * fontScale, - fontWeight: _adjustWeight(FontWeight.bold), - fontFamily: fontFamily, - ); + static TextStyle get title2 => TextStyle( + fontSize: fontTitle2 * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.bold), + fontFamily: instance.fontFamily, + ); - /// 导航栏标题 20sp Semibold - TextStyle get title3 => TextStyle( - fontSize: fontTitle3 * fontScale, - fontWeight: _adjustWeight(FontWeight.w600), - fontFamily: fontFamily, - ); + static TextStyle get title3 => TextStyle( + fontSize: fontTitle3 * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.w600), + fontFamily: instance.fontFamily, + ); - /// 列表标题 18sp Semibold - TextStyle get headline => TextStyle( - fontSize: fontHeadline * fontScale, - fontWeight: _adjustWeight(FontWeight.w600), - fontFamily: fontFamily, - ); + static TextStyle get headline => TextStyle( + fontSize: fontHeadline * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.w600), + fontFamily: instance.fontFamily, + ); - /// 正文 16sp Regular - TextStyle get body => TextStyle( - fontSize: fontBody * fontScale, - fontWeight: fontWeight, - fontFamily: fontFamily, - ); + static TextStyle get body => TextStyle( + fontSize: fontBody * instance.fontScale, + fontWeight: instance.fontWeight, + fontFamily: instance.fontFamily, + ); - /// 强调文字 16sp Medium - TextStyle get callout => TextStyle( - fontSize: fontCallout * fontScale, - fontWeight: _adjustWeight(FontWeight.w500), - fontFamily: fontFamily, - ); + static TextStyle get callout => TextStyle( + fontSize: fontCallout * instance.fontScale, + fontWeight: instance._adjustWeight(FontWeight.w500), + fontFamily: instance.fontFamily, + ); - /// 辅助说明 14sp Regular - TextStyle get subhead => TextStyle( - fontSize: fontSubhead * fontScale, - fontWeight: fontWeight, - fontFamily: fontFamily, - ); + static TextStyle get subhead => TextStyle( + fontSize: fontSubhead * instance.fontScale, + fontWeight: instance.fontWeight, + fontFamily: instance.fontFamily, + ); - /// 脚注 13sp Regular - TextStyle get footnote => TextStyle( - fontSize: fontFootnote * fontScale, - fontWeight: fontWeight, - fontFamily: fontFamily, - ); + static TextStyle get footnote => TextStyle( + fontSize: fontFootnote * instance.fontScale, + fontWeight: instance.fontWeight, + fontFamily: instance.fontFamily, + ); - /// 标签 12sp Regular - TextStyle get caption1 => TextStyle( - fontSize: fontCaption1 * fontScale, - fontWeight: fontWeight, - fontFamily: fontFamily, - ); + static TextStyle get caption1 => TextStyle( + fontSize: fontCaption1 * instance.fontScale, + fontWeight: instance.fontWeight, + fontFamily: instance.fontFamily, + ); - /// 极小文字 11sp Regular - TextStyle get caption2 => TextStyle( - fontSize: fontCaption2 * fontScale, - fontWeight: fontWeight, - fontFamily: fontFamily, - ); + static TextStyle get caption2 => TextStyle( + fontSize: fontCaption2 * instance.fontScale, + fontWeight: instance.fontWeight, + fontFamily: instance.fontFamily, + ); // ---- ThemeExtension 实现 ---- @@ -183,8 +156,7 @@ class AppTypography extends ThemeExtension { // ---- 便捷访问 ---- - /// 从 BuildContext 获取当前主题的 AppTypography 实例 static AppTypography of(BuildContext context) { - return Theme.of(context).extension() ?? const AppTypography(); + return Theme.of(context).extension() ?? instance; } } diff --git a/lib/editor/pages/editor/mini_editor_page.dart b/lib/editor/pages/editor/mini_editor_page.dart index ce86568a..b9bacc66 100644 --- a/lib/editor/pages/editor/mini_editor_page.dart +++ b/lib/editor/pages/editor/mini_editor_page.dart @@ -140,7 +140,7 @@ class _MiniEditorPageState extends ConsumerState { const SizedBox(width: 4), Text( '导出', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Colors.white, fontWeight: FontWeight.w600, ), @@ -273,7 +273,7 @@ class _TabItem extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( fontSize: 10, color: isActive ? LightColors.primary : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.w400, diff --git a/lib/editor/pages/editor/mini_editor_sheet.dart b/lib/editor/pages/editor/mini_editor_sheet.dart index 5ceeafde..f390c113 100644 --- a/lib/editor/pages/editor/mini_editor_sheet.dart +++ b/lib/editor/pages/editor/mini_editor_sheet.dart @@ -137,7 +137,7 @@ class _MiniEditorSheetState extends ConsumerState { children: [ Text( '✏️ 快速编辑', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const Spacer(), CupertinoButton( @@ -164,7 +164,7 @@ class _MiniEditorSheetState extends ConsumerState { const SizedBox(width: 4), Text( '保存', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Colors.white, fontWeight: FontWeight.w600, ), @@ -269,7 +269,7 @@ class _SheetTab extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? LightColors.primary : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.w400, ), diff --git a/lib/editor/pages/editor/mini_editor_widget.dart b/lib/editor/pages/editor/mini_editor_widget.dart index 698608f0..6974b121 100644 --- a/lib/editor/pages/editor/mini_editor_widget.dart +++ b/lib/editor/pages/editor/mini_editor_widget.dart @@ -233,7 +233,7 @@ class _InlineTab extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? LightColors.primary : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.w400, ), diff --git a/lib/editor/pages/editor/pro_editor_page.dart b/lib/editor/pages/editor/pro_editor_page.dart index 6f8cde77..d77a1814 100644 --- a/lib/editor/pages/editor/pro_editor_page.dart +++ b/lib/editor/pages/editor/pro_editor_page.dart @@ -15,7 +15,6 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:pro_image_editor/pro_image_editor.dart' as pro; import 'package:xianyan/core/router/editor_router.dart'; -import 'package:xianyan/editor/services/core/canvas_style_middleware.dart'; import 'package:xianyan/editor/services/core/pro_editor_bridge.dart'; import 'package:xianyan/editor/services/core/editor_theme_notifier.dart'; import 'package:xianyan/editor/widgets/controls/editor_system_ui.dart'; diff --git a/lib/editor/pages/tools/draft_list_page.dart b/lib/editor/pages/tools/draft_list_page.dart index a4c4f966..45b58461 100644 --- a/lib/editor/pages/tools/draft_list_page.dart +++ b/lib/editor/pages/tools/draft_list_page.dart @@ -141,7 +141,7 @@ class _DraftListPageState extends State { leading: const AdaptiveBackButton(), middle: Text( '📝 草稿箱', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), trailing: _drafts.isNotEmpty ? GestureDetector( @@ -150,7 +150,7 @@ class _DraftListPageState extends State { padding: const EdgeInsets.symmetric(horizontal: 8), child: Text( '清空', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -178,12 +178,12 @@ class _DraftListPageState extends State { const SizedBox(height: AppSpacing.md), Text( '暂无草稿', - style: AppTypography.of(context).headline.copyWith(color: ext.textSecondary), + style: AppTypography.headline.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '编辑时会自动保存草稿到这里', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -242,7 +242,7 @@ class _DraftListPageState extends State { (draft.preview['text'] as String?)?.isNotEmpty == true ? draft.preview['text'] as String : '(空文字)', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -260,7 +260,7 @@ class _DraftListPageState extends State { const SizedBox(width: 4), Text( '${draft.preview["layerCount"] ?? 0} 个图层', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -273,7 +273,7 @@ class _DraftListPageState extends State { const SizedBox(width: 4), Text( _formatTime(draft.createdAt), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -328,7 +328,7 @@ class _DraftListPageState extends State { const SizedBox(height: 4), Text( '${draft.preview["layerCount"] ?? 0}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/editor/services/core/pro_editor_bridge.dart b/lib/editor/services/core/pro_editor_bridge.dart index 10106fad..c8602b7d 100644 --- a/lib/editor/services/core/pro_editor_bridge.dart +++ b/lib/editor/services/core/pro_editor_bridge.dart @@ -136,8 +136,6 @@ class ProEditorBridge { mainEditor: pro.MainEditorConfigs( enableZoom: true, editorMinScale: 0.5, - editorMaxScale: 5.0, - doubleTapZoomFactor: 2.0, boundaryMargin: const EdgeInsets.all(double.infinity), safeArea: const pro.EditorSafeArea.none(), widgets: pro.MainEditorWidgets( @@ -157,21 +155,17 @@ class ProEditorBridge { bodyItemsRecorded: (editor, stream) => [ if (canvasStyle != null) ...[ ...CanvasStyleMiddleware.cornerMasks( - canvasStyle!, + canvasStyle, maskColor: canvasBackground ?? const Color(0xFF1A1A2E), ).map( (w) => pro.ReactiveWidget(stream: stream, builder: (_) => w), ), - ...CanvasStyleMiddleware.borderOverlay( - canvasStyle!, - borderColor: const Color(0xFFFFFFFF), - borderWidth: 3.0, - ).map( + ...CanvasStyleMiddleware.borderOverlay(canvasStyle).map( (w) => pro.ReactiveWidget(stream: stream, builder: (_) => w), ), ], if (bodyItemsRecordedBuilder != null) - ...bodyItemsRecordedBuilder!(editor, stream).map( + ...bodyItemsRecordedBuilder(editor, stream).map( (w) => pro.ReactiveWidget(stream: stream, builder: (_) => w), ), ], diff --git a/lib/editor/widgets/controls/mini_bg_bar.dart b/lib/editor/widgets/controls/mini_bg_bar.dart index f265dc33..7a5b3554 100644 --- a/lib/editor/widgets/controls/mini_bg_bar.dart +++ b/lib/editor/widgets/controls/mini_bg_bar.dart @@ -86,7 +86,7 @@ class MiniBgBar extends StatelessWidget { children: [ Text( '🎨 纯色', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -115,7 +115,7 @@ class MiniBgBar extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '🌈 渐变', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), diff --git a/lib/editor/widgets/controls/mini_canvas_preview.dart b/lib/editor/widgets/controls/mini_canvas_preview.dart index 181d20fe..c0c637b5 100644 --- a/lib/editor/widgets/controls/mini_canvas_preview.dart +++ b/lib/editor/widgets/controls/mini_canvas_preview.dart @@ -75,7 +75,7 @@ class MiniCanvasPreview extends StatelessWidget { fontSize: fontSize, fontWeight: FontWeight.bold, color: textColor, - fontFamily: AppTypography.fontFamily, + fontFamily: AppTypography.instance.fontFamily, height: 1.4, ), ), diff --git a/lib/editor/widgets/controls/mini_text_bar.dart b/lib/editor/widgets/controls/mini_text_bar.dart index 675bf8c6..ae25b5c8 100644 --- a/lib/editor/widgets/controls/mini_text_bar.dart +++ b/lib/editor/widgets/controls/mini_text_bar.dart @@ -47,7 +47,7 @@ class MiniTextBar extends StatelessWidget { color: ext.bgSecondary, borderRadius: BorderRadius.circular(12), ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), onChanged: onTextChanged, controller: TextEditingController(text: text) ..selection = TextSelection.collapsed(offset: text.length), diff --git a/lib/editor/widgets/controls/tips_view.dart b/lib/editor/widgets/controls/tips_view.dart index ce898913..f8c21f74 100644 --- a/lib/editor/widgets/controls/tips_view.dart +++ b/lib/editor/widgets/controls/tips_view.dart @@ -116,7 +116,7 @@ class _TipsViewState extends State Expanded( child: Text( widget.message, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.4, ), diff --git a/lib/editor/widgets/editors/eye_dropper.dart b/lib/editor/widgets/editors/eye_dropper.dart index 09c5a9c7..74b2c20b 100644 --- a/lib/editor/widgets/editors/eye_dropper.dart +++ b/lib/editor/widgets/editors/eye_dropper.dart @@ -73,7 +73,7 @@ class _EyeDropperButtonState extends State { const SizedBox(width: 4), Text( '🎯 取色', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontSize: 11, color: _isActive ? LightColors.primary @@ -235,7 +235,7 @@ class _EyeDropperOverlayState extends State { const SizedBox(width: 8), Text( '点击或拖拽拾取颜色', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: Colors.white, ), ), diff --git a/lib/editor/widgets/editors/glass_slider.dart b/lib/editor/widgets/editors/glass_slider.dart index 6ad06632..d697c9ef 100644 --- a/lib/editor/widgets/editors/glass_slider.dart +++ b/lib/editor/widgets/editors/glass_slider.dart @@ -46,7 +46,7 @@ class GlassSlider extends StatelessWidget { width: 64, child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -67,7 +67,7 @@ class GlassSlider extends StatelessWidget { width: 52, child: Text( '${value.toStringAsFixed(1)}$suffix', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), diff --git a/lib/editor/widgets/panels/glass_preset_sheet.dart b/lib/editor/widgets/panels/glass_preset_sheet.dart index b94f456a..cd1cfec1 100644 --- a/lib/editor/widgets/panels/glass_preset_sheet.dart +++ b/lib/editor/widgets/panels/glass_preset_sheet.dart @@ -63,7 +63,7 @@ class GlassPresetSheet extends StatelessWidget { children: [ Text( '🧊 氢设计风格', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: Colors.white, fontSize: 20, ), @@ -162,7 +162,7 @@ class _PresetCard extends StatelessWidget { ), child: Text( preset.name, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: Colors.white, fontSize: 13, fontWeight: FontWeight.w500, diff --git a/lib/editor/widgets/panels/sticker_picker.dart b/lib/editor/widgets/panels/sticker_picker.dart index 5d92c591..ff066624 100644 --- a/lib/editor/widgets/panels/sticker_picker.dart +++ b/lib/editor/widgets/panels/sticker_picker.dart @@ -139,7 +139,7 @@ class _StickerPickerPanelState extends State { const SizedBox(width: 6), Text( '贴纸装饰', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: widget.ext.textPrimary, ), ), diff --git a/lib/editor/widgets/panels/template_picker_sheet.dart b/lib/editor/widgets/panels/template_picker_sheet.dart index 3741b4db..d6ce022d 100644 --- a/lib/editor/widgets/panels/template_picker_sheet.dart +++ b/lib/editor/widgets/panels/template_picker_sheet.dart @@ -63,7 +63,7 @@ class TemplatePickerSheet extends StatelessWidget { children: [ Text( '🎨 选择模板', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), CupertinoButton( padding: EdgeInsets.zero, @@ -211,7 +211,7 @@ class _TemplateCard extends StatelessWidget { ), child: Text( '${template.emoji} ${template.name}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: Colors.white, fontWeight: FontWeight.w600, ), diff --git a/lib/features/agreements/presentation/agreement_list_page.dart b/lib/features/agreements/presentation/agreement_list_page.dart index 8f903895..d0810ef4 100644 --- a/lib/features/agreements/presentation/agreement_list_page.dart +++ b/lib/features/agreements/presentation/agreement_list_page.dart @@ -38,7 +38,7 @@ class AgreementListPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( languageId == 'en' ? 'Agreements' : '软件协议', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -116,7 +116,7 @@ class _HeaderCard extends StatelessWidget { children: [ Text( isEn ? 'Agreements & Policies' : '软件协议与政策', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -126,7 +126,7 @@ class _HeaderCard extends StatelessWidget { isEn ? 'Please read the following agreements and policies carefully' : '请仔细阅读以下协议与政策,了解您的权利与义务', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -263,7 +263,7 @@ class _SectionGroup extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, color: ext.textHint, ), @@ -328,7 +328,7 @@ class _AgreementTile extends StatelessWidget { children: [ Text( type.titleFor(languageId), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w500, color: ext.textPrimary, ), @@ -336,7 +336,7 @@ class _AgreementTile extends StatelessWidget { const SizedBox(height: 2), Text( AgreementData.getSubtitle(type, languageId: languageId), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 1, @@ -408,7 +408,7 @@ class _Footer extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( _isEn ? 'Online Version' : '在线版协议', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -416,7 +416,7 @@ class _Footer extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( AgreementType.webIndexUrl, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent.withValues(alpha: 0.7), ), ), @@ -429,7 +429,7 @@ class _Footer extends StatelessWidget { _isEn ? 'By using Xianyan APP, you agree to the above agreements and policies' : '使用闲言APP即表示您同意上述协议与政策', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.xs), @@ -437,7 +437,7 @@ class _Footer extends StatelessWidget { _isEn ? 'If you have questions, please contact 21981550@qq.com' : '如有疑问请联系 21981550@qq.com', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], diff --git a/lib/features/agreements/presentation/agreement_page.dart b/lib/features/agreements/presentation/agreement_page.dart index 2508baf1..12a943f3 100644 --- a/lib/features/agreements/presentation/agreement_page.dart +++ b/lib/features/agreements/presentation/agreement_page.dart @@ -46,7 +46,7 @@ class AgreementPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( type.titleFor(languageId), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -172,7 +172,7 @@ class _AgreementHeader extends StatelessWidget { children: [ Text( type.titleFor(languageId), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -180,7 +180,7 @@ class _AgreementHeader extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( AgreementData.getSubtitle(type, languageId: languageId), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -209,7 +209,7 @@ class _AgreementSection extends StatelessWidget { if (section.title.isNotEmpty) ...[ Text( section.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -278,7 +278,7 @@ class _RichBody extends StatelessWidget { spans.add( TextSpan( text: remaining, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.7, ), @@ -291,7 +291,7 @@ class _RichBody extends StatelessWidget { spans.add( TextSpan( text: remaining.substring(0, nextStart), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.7, ), @@ -303,7 +303,7 @@ class _RichBody extends StatelessWidget { spans.add( TextSpan( text: nextMatch.group(1), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.accent, fontWeight: FontWeight.w600, height: 1.7, @@ -314,7 +314,7 @@ class _RichBody extends StatelessWidget { spans.add( TextSpan( text: nextMatch.group(1), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, height: 1.7, @@ -380,7 +380,7 @@ class _AgreementFooter extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( _isEn ? 'Online Version' : '在线版', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -389,7 +389,7 @@ class _AgreementFooter extends StatelessWidget { Flexible( child: Text( type.webUrlFor(languageId), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent.withValues(alpha: 0.7), ), overflow: TextOverflow.ellipsis, @@ -402,7 +402,7 @@ class _AgreementFooter extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( _isEn ? 'Last updated: $updateDate' : '最后更新日期:$updateDate', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.xs), @@ -410,7 +410,7 @@ class _AgreementFooter extends StatelessWidget { _isEn ? 'Mile City Pengpu Town Weifengbao Network Technology Studio' : '弥勒市朋普镇微风暴网络科技工作室', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], diff --git a/lib/features/article/presentation/article_detail_page.dart b/lib/features/article/presentation/article_detail_page.dart index fff7429c..36a7509e 100644 --- a/lib/features/article/presentation/article_detail_page.dart +++ b/lib/features/article/presentation/article_detail_page.dart @@ -59,7 +59,7 @@ class _ArticleDetailPageState extends ConsumerState { '暂不支持普通用户投稿,\n仅支持广告商和管理员投稿', // '暂不支持普通用户投稿,\n仅支持广告商和管理员投稿', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), ) : CupertinoScrollbar( @@ -82,7 +82,7 @@ class _ArticleDetailPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( article.title, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -99,14 +99,14 @@ class _ArticleDetailPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( article.authorName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), const Spacer(), Text( article.createdAt, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -117,21 +117,21 @@ class _ArticleDetailPageState extends ConsumerState { children: [ Text( '👁️ ${article.viewCount}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), const SizedBox(width: AppSpacing.md), Text( '❤️ ${article.likeCount}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), const SizedBox(width: AppSpacing.md), Text( '💬 ${article.commentCount}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -143,7 +143,7 @@ class _ArticleDetailPageState extends ConsumerState { ), Text( article.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.8, ), @@ -167,7 +167,7 @@ class _ArticleDetailPageState extends ConsumerState { ), child: Text( '#$tag', - style: AppTypography.of(context).caption2 + style: AppTypography.caption2 .copyWith(color: ext.accent), ), ), @@ -178,7 +178,7 @@ class _ArticleDetailPageState extends ConsumerState { const SizedBox(height: AppSpacing.xl), Text( '💬 评论 (${state.comments.length})', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -228,7 +228,7 @@ class _CommentCard extends StatelessWidget { children: [ Text( comment.userName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -236,7 +236,7 @@ class _CommentCard extends StatelessWidget { const Spacer(), Text( comment.createdAt, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -245,7 +245,7 @@ class _CommentCard extends StatelessWidget { const SizedBox(height: 4), Text( comment.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/article/presentation/article_edit_page.dart b/lib/features/article/presentation/article_edit_page.dart index 9c7339fd..b495760f 100644 --- a/lib/features/article/presentation/article_edit_page.dart +++ b/lib/features/article/presentation/article_edit_page.dart @@ -95,7 +95,7 @@ class _ArticleEditPageState extends ConsumerState { ? const CupertinoActivityIndicator() : Text( '发布', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: _canSubmit ? ext.accent : ext.textHint, fontWeight: FontWeight.w600, ), @@ -193,7 +193,7 @@ class _ArticleEditPageState extends ConsumerState { CupertinoTextField( controller: _titleController, placeholder: '输入文章标题...', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -207,7 +207,7 @@ class _ArticleEditPageState extends ConsumerState { CupertinoTextField( controller: _contentController, placeholder: '开始写作...\n\n支持多段落,尽情发挥吧 ✍️', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.8, ), @@ -247,7 +247,7 @@ class _ArticleEditPageState extends ConsumerState { if (title.isNotEmpty) Text( title, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -257,7 +257,7 @@ class _ArticleEditPageState extends ConsumerState { if (content.isNotEmpty) Text( content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.8, ), @@ -280,7 +280,7 @@ class _ArticleEditPageState extends ConsumerState { ), child: Text( '#$tag', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, ), ), @@ -300,7 +300,7 @@ class _ArticleEditPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '还没有内容可以预览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -328,7 +328,7 @@ class _ArticleEditPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '摘要', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -336,7 +336,7 @@ class _ArticleEditPageState extends ConsumerState { const Spacer(), Text( '可选', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -344,7 +344,7 @@ class _ArticleEditPageState extends ConsumerState { CupertinoTextField( controller: _summaryController, placeholder: '简短描述文章内容...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary.withValues(alpha: 0.5), borderRadius: AppRadius.mdBorder, @@ -382,7 +382,7 @@ class _ArticleEditPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '分类', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -420,7 +420,7 @@ class _ArticleEditPageState extends ConsumerState { const SizedBox(width: 4), Text( cat.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, @@ -465,7 +465,7 @@ class _ArticleEditPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '标签', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -473,7 +473,7 @@ class _ArticleEditPageState extends ConsumerState { const Spacer(), Text( '${_tags.length}/5', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _tags.length >= 5 ? CupertinoColors.systemRed : ext.textHint, @@ -488,7 +488,7 @@ class _ArticleEditPageState extends ConsumerState { child: CupertinoTextField( controller: _tagController, placeholder: '输入标签后回车添加', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), decoration: BoxDecoration( @@ -543,7 +543,7 @@ class _ArticleEditPageState extends ConsumerState { children: [ Text( '#${entry.value}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, ), ), @@ -682,7 +682,7 @@ class _StatChip extends StatelessWidget { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: color, fontWeight: FontWeight.w800, fontSize: 18, @@ -690,7 +690,7 @@ class _StatChip extends StatelessWidget { ), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/article/presentation/article_list_page.dart b/lib/features/article/presentation/article_list_page.dart index 602d1e4c..e4568663 100644 --- a/lib/features/article/presentation/article_list_page.dart +++ b/lib/features/article/presentation/article_list_page.dart @@ -202,10 +202,10 @@ class _SearchBar extends StatelessWidget { child: CupertinoTextField( controller: controller, placeholder: '搜索文章标题、内容...', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), decoration: const BoxDecoration(), onSubmitted: onSearch, ), @@ -283,12 +283,12 @@ class _EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( '暂无文章', - style: AppTypography.of(context).title3.copyWith(color: ext.textHint), + style: AppTypography.title3.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.xs), Text( '成为第一个分享知识的人吧', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.lg), CupertinoButton( @@ -388,7 +388,7 @@ class _FilterChip extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.bold : FontWeight.normal, ), @@ -510,14 +510,14 @@ class _ArticleCardState extends State<_ArticleCard> { children: [ Text( a.authorName.isNotEmpty ? a.authorName : '匿名用户', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( a.createdAt, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -534,7 +534,7 @@ class _ArticleCardState extends State<_ArticleCard> { ), child: Text( _getCategoryEmoji(a.category) + ' ${a.category}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -547,7 +547,7 @@ class _ArticleCardState extends State<_ArticleCard> { Widget _buildTitle(Article a, AppThemeExtension ext) { return Text( a.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -561,7 +561,7 @@ class _ArticleCardState extends State<_ArticleCard> { padding: const EdgeInsets.only(top: 4), child: Text( a.summary, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, height: 1.4, ), @@ -648,7 +648,7 @@ class _ArticleCardState extends State<_ArticleCard> { ), child: Text( '#$tag', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -715,7 +715,7 @@ class _ActionButton extends StatelessWidget { const SizedBox(width: 3), Text( _formatCount(count), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? activeColor : ext.textHint, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), diff --git a/lib/features/article/presentation/my_articles_page.dart b/lib/features/article/presentation/my_articles_page.dart index cbc2b0bd..6d725dbf 100644 --- a/lib/features/article/presentation/my_articles_page.dart +++ b/lib/features/article/presentation/my_articles_page.dart @@ -198,11 +198,11 @@ class _EmptyState extends StatelessWidget { const Text('📭', style: TextStyle(fontSize: 56)), const SizedBox(height: AppSpacing.md), Text('还没有发布文章', - style: AppTypography.of(context).title3 + style: AppTypography.title3 .copyWith(color: ext.textSecondary)), const SizedBox(height: AppSpacing.xs), Text('记录你的思考与发现', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textHint)), const SizedBox(height: AppSpacing.lg), CupertinoButton( @@ -216,7 +216,7 @@ class _EmptyState extends StatelessWidget { const Text('✏️', style: TextStyle(fontSize: 14)), const SizedBox(width: 8), Text('写第一篇', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textInverse, fontWeight: FontWeight.w600)), ], @@ -268,7 +268,7 @@ class _ArticleStatsHeader extends StatelessWidget { ), const SizedBox(width: AppSpacing.sm), Text('创作概览', - style: AppTypography.of(context).title3 + style: AppTypography.title3 .copyWith(color: ext.textPrimary)), ], ), @@ -355,13 +355,13 @@ class _MiniStat extends StatelessWidget { Text(emoji, style: const TextStyle(fontSize: 16)), const SizedBox(height: 4), Text(value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, fontSize: 16)), const SizedBox(height: 2), Text(label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10)), ], ), @@ -429,7 +429,7 @@ class _ArticleCard extends StatelessWidget { Expanded( child: Text( article.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -448,7 +448,7 @@ class _ArticleCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( article.summary, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, height: 1.4), maxLines: 2, overflow: TextOverflow.ellipsis, @@ -469,7 +469,7 @@ class _ArticleCard extends StatelessWidget { ), child: Text( '#$tag', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -510,7 +510,7 @@ class _ArticleCard extends StatelessWidget { ), child: Text( article.category, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemTeal, fontSize: 10, ), @@ -527,7 +527,7 @@ class _ArticleCard extends StatelessWidget { borderRadius: AppRadius.pillBorder, ), child: Text('查看', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600)), ), @@ -582,7 +582,7 @@ class _StatusBadge extends StatelessWidget { const SizedBox(width: 4), Text( isPublished ? '已发布' : '草稿', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isPublished ? CupertinoColors.systemGreen : CupertinoColors.systemOrange, @@ -613,7 +613,7 @@ class _StatChip extends StatelessWidget { Text(emoji, style: const TextStyle(fontSize: 11)), const SizedBox(width: 2), Text(value, - style: AppTypography.of(context).caption2 + style: AppTypography.caption2 .copyWith(color: ext.textHint)), ], ); diff --git a/lib/features/auth/presentation/login_form_sections.dart b/lib/features/auth/presentation/login_form_sections.dart index 4d8e1a81..eb5e24ed 100644 --- a/lib/features/auth/presentation/login_form_sections.dart +++ b/lib/features/auth/presentation/login_form_sections.dart @@ -71,7 +71,7 @@ class PasswordFormSection extends StatelessWidget { onPressed: onForgotPassword, child: Text( '忘记密码?', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -144,7 +144,7 @@ class CodeFormSection extends StatelessWidget { ? CupertinoActivityIndicator(radius: 8, color: ext.accent) : Text( emsCountdown > 0 ? '${emsCountdown}s' : '发送验证码', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontSize: 13, ), @@ -187,7 +187,7 @@ class TokenFormSection extends StatelessWidget { Text( '输入Token令牌快速登录\n适用于多设备同步', textAlign: TextAlign.center, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -208,7 +208,7 @@ class TokenFormSection extends StatelessWidget { const SizedBox(width: 4), Text( '可在「安全与Token管理」中获取Token', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -251,7 +251,7 @@ class LegacyFormSection extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '老用户登录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -259,7 +259,7 @@ class LegacyFormSection extends StatelessWidget { const SizedBox(height: 4), Text( '使用旧版账号体系登录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -305,7 +305,7 @@ class LegacyFormSection extends StatelessWidget { const SizedBox(width: 6), Text( '关于老用户登录', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -319,7 +319,7 @@ class LegacyFormSection extends StatelessWidget { '• 专属老用户标识和称号\n' '• 部分高级功能优先体验\n\n' '该登录方式正在迁移中,请使用其他方式登录。', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.5, ), @@ -378,10 +378,10 @@ class LoginInputField extends StatelessWidget { child: CupertinoTextField( controller: controller, placeholder: placeholder, - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -442,7 +442,7 @@ class LabeledInputField extends StatelessWidget { ], Text( label, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -506,7 +506,7 @@ class LoginSuccessView extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '登录成功', - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -514,7 +514,7 @@ class LoginSuccessView extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( '正在跳转...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ).animate().fadeIn(duration: 300.ms, delay: 400.ms), ], ); diff --git a/lib/features/auth/presentation/login_page.dart b/lib/features/auth/presentation/login_page.dart index 9f443315..0f2f7618 100644 --- a/lib/features/auth/presentation/login_page.dart +++ b/lib/features/auth/presentation/login_page.dart @@ -184,7 +184,7 @@ class _LoginPageState extends ConsumerState children: [ Text( title, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -192,7 +192,7 @@ class _LoginPageState extends ConsumerState const SizedBox(height: 2), Text( subtitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -254,7 +254,7 @@ class _LoginPageState extends ConsumerState const SizedBox(width: 6), Text( _loginModeButtonText, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -273,14 +273,14 @@ class _LoginPageState extends ConsumerState onPressed: () => setState(() => _isRegisterMode = true), child: Text( '还没有账号?立即注册', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), CupertinoButton( onPressed: () => context.appGo(AppRoutes.home), child: Text( '暂不登录', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ), _buildAgreement(ext), @@ -333,7 +333,7 @@ class _LoginPageState extends ConsumerState const SizedBox(width: 3), Text( label, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( fontSize: 12, color: ext.textPrimary, ), @@ -442,7 +442,7 @@ class _LoginPageState extends ConsumerState padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm), child: Text( '其他方式', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -533,7 +533,7 @@ class _LoginPageState extends ConsumerState const SizedBox(height: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: disabled ? ext.textDisabled : ext.textSecondary, ), ), @@ -642,7 +642,7 @@ class _LoginPageState extends ConsumerState child: Text.rich( TextSpan( text: '${_isRegisterMode ? "注册" : "登录"}即表示同意', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), children: [ @@ -651,7 +651,7 @@ class _LoginPageState extends ConsumerState onTap: () => _showAgreement('用户协议'), child: Text( '《用户协议》', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -660,7 +660,7 @@ class _LoginPageState extends ConsumerState ), TextSpan( text: '和', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -669,7 +669,7 @@ class _LoginPageState extends ConsumerState onTap: () => _showAgreement('隐私政策'), child: Text( '《隐私政策》', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/auth/presentation/qrcode_login_page.dart b/lib/features/auth/presentation/qrcode_login_page.dart index 9e446dbf..3c026592 100644 --- a/lib/features/auth/presentation/qrcode_login_page.dart +++ b/lib/features/auth/presentation/qrcode_login_page.dart @@ -161,7 +161,7 @@ class _QrcodeLoginPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '📷 二维码登录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -238,7 +238,7 @@ class _QrcodeLoginPageState extends ConsumerState { child: Center( child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), @@ -270,7 +270,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '扫描Web端二维码', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -278,7 +278,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '请在网页端打开登录页面,使用本应用扫描二维码确认登录', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ).animate().fadeIn(duration: 400.ms, delay: 100.ms), const SizedBox(height: AppSpacing.lg), @@ -322,7 +322,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '正在扫描…', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -482,7 +482,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '正在确认登录…', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -490,7 +490,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '请在Web端确认登录请求', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -529,7 +529,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '需要相机权限', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -537,7 +537,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '请在系统设置中开启相机权限,以使用扫码登录功能', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.lg), @@ -560,7 +560,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '重新授权', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -590,7 +590,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: 6), Text( '使用提示', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -615,7 +615,7 @@ class _QrcodeLoginPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( text, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ); } @@ -632,7 +632,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( 'Web端扫码登录', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -640,7 +640,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '在Web端扫描下方二维码即可登录', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ).animate().fadeIn(duration: 400.ms, delay: 100.ms), const SizedBox(height: AppSpacing.lg), @@ -704,7 +704,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: 4), Text( '有效期 ${result.expireSeconds ~/ 60} 分钟', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -744,7 +744,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '二维码已过期', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -770,7 +770,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '重新生成', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -798,7 +798,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '正在生成二维码…', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -830,7 +830,7 @@ class _QrcodeLoginPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '刷新二维码', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -848,7 +848,7 @@ class _QrcodeLoginPageState extends ConsumerState { Flexible( child: Text( '请勿将二维码分享给他人,以免账号被盗', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ), @@ -873,7 +873,7 @@ class _QrcodeLoginPageState extends ConsumerState { const Text('✅ '), Text( '登录成功', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.w700, ), ), @@ -883,7 +883,7 @@ class _QrcodeLoginPageState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '已成功在Web端登录,即将返回', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), ), diff --git a/lib/features/auth/presentation/register_section.dart b/lib/features/auth/presentation/register_section.dart index d46e0487..ad58f31f 100644 --- a/lib/features/auth/presentation/register_section.dart +++ b/lib/features/auth/presentation/register_section.dart @@ -113,7 +113,7 @@ class _RegisterSectionState extends ConsumerState { }, child: Text( '已有账号?去登录', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], @@ -149,7 +149,7 @@ class _RegisterSectionState extends ConsumerState { children: [ Text( '创建账号', - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -157,7 +157,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(height: 2), Text( '注册一个新账号开始使用', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -243,7 +243,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: 6), Text( '下一步', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -266,7 +266,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '验证码已发送至 ${_emailController.text.trim()}', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), textAlign: TextAlign.center, @@ -295,7 +295,7 @@ class _RegisterSectionState extends ConsumerState { ? CupertinoActivityIndicator(radius: 6, color: ext.accent) : Text( _emsCountdown > 0 ? '${_emsCountdown}s' : '重新发送', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), @@ -324,7 +324,7 @@ class _RegisterSectionState extends ConsumerState { children: [ Text( 'Tips', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -332,7 +332,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(height: 2), Text( '若未收到验证码,请检查垃圾邮箱。如需帮助,请联系客服。', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -364,7 +364,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: 6), Text( '上一步', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -396,7 +396,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: 6), Text( '下一步', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -478,7 +478,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '🛡️ 密保问题(选填)', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _showSecQuestion ? ext.accent : ext.textSecondary, @@ -487,7 +487,7 @@ class _RegisterSectionState extends ConsumerState { const Spacer(), Text( _selectedSecQuestionText.isNotEmpty ? '已选择' : '增强账号安全', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -530,7 +530,7 @@ class _RegisterSectionState extends ConsumerState { _selectedSecQuestionText.isNotEmpty ? _selectedSecQuestionText : '选择密保问题', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _selectedSecQuestionText.isNotEmpty ? ext.textPrimary : ext.textHint, @@ -555,10 +555,10 @@ class _RegisterSectionState extends ConsumerState { child: CupertinoTextField( controller: _secAnswerController, placeholder: '输入密保答案(1-50位)', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: null, padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, @@ -599,7 +599,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '订阅闲言团队的邮箱推送', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -628,7 +628,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: 6), Text( '上一步', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -667,7 +667,7 @@ class _RegisterSectionState extends ConsumerState { const SizedBox(width: 6), Text( '完成注册', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -826,7 +826,7 @@ class _RegisterSectionState extends ConsumerState { CupertinoButton( child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -834,7 +834,7 @@ class _RegisterSectionState extends ConsumerState { ), Text( '选择密保问题', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -842,7 +842,7 @@ class _RegisterSectionState extends ConsumerState { CupertinoButton( child: Text( '确定', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -873,7 +873,7 @@ class _RegisterSectionState extends ConsumerState { return Center( child: Text( q.question, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/check/presentation/check_page.dart b/lib/features/check/presentation/check_page.dart index 30612546..a37288f8 100644 --- a/lib/features/check/presentation/check_page.dart +++ b/lib/features/check/presentation/check_page.dart @@ -159,7 +159,7 @@ class _TextInputSection extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '输入待查重文本', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -167,7 +167,7 @@ class _TextInputSection extends StatelessWidget { CupertinoTextField( controller: controller, placeholder: '粘贴或输入需要查重的文本内容...', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -189,7 +189,7 @@ class _TextInputSection extends StatelessWidget { children: [ Text( '$count / 5000', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: count > 5000 ? CupertinoColors.systemRed : ext.textHint, @@ -237,7 +237,7 @@ class _SourceSelector extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '数据源', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textSecondary, ), ), @@ -245,7 +245,7 @@ class _SourceSelector extends ConsumerWidget { if (state.selectedSources.isNotEmpty) Text( '已选 ${state.selectedSources.length} 项', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ], ), @@ -281,7 +281,7 @@ class _SourceSelector extends ConsumerWidget { const SizedBox(width: 4), Text( src.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.bold @@ -332,7 +332,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '查重模式', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textSecondary, ), ), @@ -356,7 +356,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(width: 4), Text( '精确', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -372,7 +372,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(width: 4), Text( '模糊', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -388,7 +388,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(width: 4), Text( '相似度', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -404,7 +404,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(width: 4), Text( '综合', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -416,7 +416,7 @@ class _ModeSelector extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), Text( _modeDescription(state.selectedMode), - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -542,7 +542,7 @@ class _ErrorBanner extends StatelessWidget { Expanded( child: Text( error, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -625,7 +625,7 @@ class _CheckResultDashboard extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '查重结果', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -641,7 +641,7 @@ class _CheckResultDashboard extends StatelessWidget { ), child: Text( _riskLabel(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: riskColor, fontWeight: FontWeight.bold, ), @@ -755,7 +755,7 @@ class _SimilarityGauge extends StatelessWidget { children: [ Text( '${simPercent.toStringAsFixed(1)}%', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: riskColor, fontWeight: FontWeight.bold, ), @@ -763,7 +763,7 @@ class _SimilarityGauge extends StatelessWidget { const SizedBox(height: 2), Text( '相似度', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -795,7 +795,7 @@ class _ResultStatItem extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: color, fontWeight: FontWeight.bold, ), @@ -803,7 +803,7 @@ class _ResultStatItem extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -844,12 +844,12 @@ class _MatchDetailSection extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '匹配详情', - style: AppTypography.of(context).callout.copyWith(color: ext.textSecondary), + style: AppTypography.callout.copyWith(color: ext.textSecondary), ), const Spacer(), Text( '${matches.length} 条匹配', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -937,7 +937,7 @@ class _MatchCard extends StatelessWidget { Expanded( child: Text( match.sourceTitle, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -956,7 +956,7 @@ class _MatchCard extends StatelessWidget { ), child: Text( '$simPercent%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: riskColor, fontWeight: FontWeight.bold, ), @@ -984,7 +984,7 @@ class _MatchCard extends StatelessWidget { ), child: Text( match.matchedText, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.5, ), diff --git a/lib/features/classics/presentation/classics_list_page.dart b/lib/features/classics/presentation/classics_list_page.dart index 59bd32b7..7e0bb1b0 100644 --- a/lib/features/classics/presentation/classics_list_page.dart +++ b/lib/features/classics/presentation/classics_list_page.dart @@ -85,7 +85,7 @@ class _ClassicsListPageState extends ConsumerState { ? Center( child: Text( '暂无内容', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext?.textHint ?? CupertinoColors.placeholderText, ), @@ -149,7 +149,7 @@ class _ListItem extends StatelessWidget { if (title.isNotEmpty) Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w600, color: ext?.textPrimary ?? CupertinoColors.label, ), @@ -160,7 +160,7 @@ class _ListItem extends StatelessWidget { const SizedBox(height: 6), Text( content, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), maxLines: 4, diff --git a/lib/features/classics/presentation/classics_page.dart b/lib/features/classics/presentation/classics_page.dart index 82bd1661..f8a5ade1 100644 --- a/lib/features/classics/presentation/classics_page.dart +++ b/lib/features/classics/presentation/classics_page.dart @@ -88,7 +88,7 @@ class _CategoryCard extends StatelessWidget { Expanded( child: Text( category.name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, fontWeight: FontWeight.w600, ), @@ -100,7 +100,7 @@ class _CategoryCard extends StatelessWidget { const SizedBox(height: 8), Text( category.desc, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), ), diff --git a/lib/features/correction/presentation/correction_page.dart b/lib/features/correction/presentation/correction_page.dart index 70876bf9..cc2fd190 100644 --- a/lib/features/correction/presentation/correction_page.dart +++ b/lib/features/correction/presentation/correction_page.dart @@ -76,7 +76,7 @@ class _CorrectionPageState extends ConsumerState { children: [ Text( '纠错类型', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -104,7 +104,7 @@ class _CorrectionPageState extends ConsumerState { ), child: Text( opt.$2, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: selected ? ext.accent : ext.textSecondary, @@ -117,7 +117,7 @@ class _CorrectionPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '内容类型', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -145,7 +145,7 @@ class _CorrectionPageState extends ConsumerState { ), child: Text( opt.$2, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: selected ? ext.accent : ext.textSecondary, @@ -158,7 +158,7 @@ class _CorrectionPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '内容ID', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -172,10 +172,10 @@ class _CorrectionPageState extends ConsumerState { child: CupertinoTextField( controller: _targetIdController, placeholder: '输入内容的ID编号', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), decoration: null, @@ -188,7 +188,7 @@ class _CorrectionPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '纠错描述', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -202,10 +202,10 @@ class _CorrectionPageState extends ConsumerState { child: CupertinoTextField( controller: _contentController, placeholder: '请详细描述需要纠正的内容...', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), decoration: null, @@ -228,7 +228,7 @@ class _CorrectionPageState extends ConsumerState { ) : Text( '📤 提交纠错', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -254,7 +254,7 @@ class _CorrectionPageState extends ConsumerState { Expanded( child: Text( '提交成功!感谢您的反馈,管理员会及时处理。', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, ), ), @@ -268,7 +268,7 @@ class _CorrectionPageState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.md), child: Text( state.error!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.systemRed, ), ), diff --git a/lib/features/countdown/presentation/countdown_page.dart b/lib/features/countdown/presentation/countdown_page.dart index 0463c5c2..2a4789eb 100644 --- a/lib/features/countdown/presentation/countdown_page.dart +++ b/lib/features/countdown/presentation/countdown_page.dart @@ -37,7 +37,7 @@ class _CountdownPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '⏰ 倒计时', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -76,7 +76,7 @@ class _CountdownPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无倒计时', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.md), CupertinoButton.filled( @@ -128,7 +128,7 @@ class _CountdownPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: 10), child: Text( title, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( fontWeight: FontWeight.w600, color: ext.textSecondary, ), @@ -184,7 +184,7 @@ class _CountdownPageState extends ConsumerState { children: [ Text( event.title, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w600, color: isPast ? ext.textHint : ext.textPrimary, ), @@ -192,7 +192,7 @@ class _CountdownPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( _formatDate(event.targetDate), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textHint, ), ), @@ -204,7 +204,7 @@ class _CountdownPageState extends ConsumerState { children: [ Text( event.isToday ? '🎉' : '${event.daysRemaining.abs()}', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( fontWeight: FontWeight.w300, color: isPast ? ext.textDisabled : color, fontSize: event.isToday ? 24 : 28, @@ -212,7 +212,7 @@ class _CountdownPageState extends ConsumerState { ), Text( event.remainingLabel, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isPast ? ext.textDisabled : ext.textSecondary, ), ), @@ -352,7 +352,7 @@ class _CountdownPageState extends ConsumerState { Center( child: Text( existing != null ? '编辑倒计时' : '新建倒计时', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -403,7 +403,7 @@ class _CountdownPageState extends ConsumerState { children: [ Text( '📅 日期', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -431,7 +431,7 @@ class _CountdownPageState extends ConsumerState { }, child: Text( _formatDate(selectedDate), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -442,7 +442,7 @@ class _CountdownPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '分类', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -475,7 +475,7 @@ class _CountdownPageState extends ConsumerState { ), child: Text( '${cat.emoji} ${cat.label}', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: isActive ? ext.accent : ext.textSecondary, diff --git a/lib/features/daily_fortune/presentation/daily_fortune_page.dart b/lib/features/daily_fortune/presentation/daily_fortune_page.dart index 001cf9e6..26b920d4 100644 --- a/lib/features/daily_fortune/presentation/daily_fortune_page.dart +++ b/lib/features/daily_fortune/presentation/daily_fortune_page.dart @@ -54,7 +54,7 @@ class _DailyFortunePageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '🔮 每日运势', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -137,14 +137,14 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( isNewest ? '最新在上面' : '最早在上面', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.xs), GestureDetector( onTap: () => context.appPush(AppRoutes.dailyFortuneSettings), child: Text( '可在设置中更改', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), ], @@ -323,7 +323,7 @@ class _DailyFortunePageState extends ConsumerState { isToday ? '今天 · ${_formatDate(record.date)}' : _formatDate(record.date), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -365,7 +365,7 @@ class _DailyFortunePageState extends ConsumerState { ), child: Text( cfg.$1, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: cfg.$2, fontWeight: FontWeight.w700, ), @@ -395,7 +395,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(width: 3), Text( dim.level.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -456,7 +456,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( record.signRank, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: levelCfg.$2, fontWeight: FontWeight.w600, ), @@ -464,7 +464,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '综合运势 ${record.fortuneScore} 分', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -493,7 +493,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(width: 3), Text( '${dim.name} ${dim.level.label}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -509,7 +509,7 @@ class _DailyFortunePageState extends ConsumerState { children: [ Text( '点击查看详情', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -578,7 +578,7 @@ class _DailyFortunePageState extends ConsumerState { Expanded( child: Text( note, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), ], @@ -669,7 +669,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isEnabled ? color : ext.textDisabled, fontWeight: FontWeight.w500, ), @@ -705,12 +705,12 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '运势加载失败', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.xs), Text( error, - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.md), @@ -725,7 +725,7 @@ class _DailyFortunePageState extends ConsumerState { ref.read(fortuneProvider.notifier).loadTodayFortune(), child: Text( '重新加载', - style: AppTypography.of(context).callout.copyWith(color: ext.textOnAccent), + style: AppTypography.callout.copyWith(color: ext.textOnAccent), ), ), ], @@ -743,7 +743,7 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '历史运势加载失败', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -761,12 +761,12 @@ class _DailyFortunePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '暂无历史运势', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.xs), Text( '每天都会自动生成运势,明天再来查看吧', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ], ), @@ -779,7 +779,7 @@ class _DailyFortunePageState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( title, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ); } @@ -828,7 +828,7 @@ class _DailyFortunePageState extends ConsumerState { children: [ Text( '${record.date} · ${record.fortuneLevel.label}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.sm), CupertinoTextField( @@ -842,7 +842,7 @@ class _DailyFortunePageState extends ConsumerState { color: ext.bgSecondary, borderRadius: AppRadius.mdBorder, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ], ), @@ -886,7 +886,7 @@ class _DailyFortunePageState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( shareText, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: AppTheme.ext(context).textSecondary, ), ), diff --git a/lib/features/daily_fortune/presentation/fortune_settings_page.dart b/lib/features/daily_fortune/presentation/fortune_settings_page.dart index 47be6455..2b3c0c26 100644 --- a/lib/features/daily_fortune/presentation/fortune_settings_page.dart +++ b/lib/features/daily_fortune/presentation/fortune_settings_page.dart @@ -78,7 +78,7 @@ class _FortuneSettingsPageState extends ConsumerState { border: null, middle: Text( '🔮 运势设置', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ), child: SafeArea( @@ -100,7 +100,7 @@ class _FortuneSettingsPageState extends ConsumerState { Center( child: Text( '闲言每日运势', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), const SizedBox(height: AppSpacing.lg), @@ -124,7 +124,7 @@ class _FortuneSettingsPageState extends ConsumerState { ), child: Text( title, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -164,7 +164,7 @@ class _FortuneSettingsPageState extends ConsumerState { children: [ Text( '🎨 卡片风格', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -201,7 +201,7 @@ class _FortuneSettingsPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( style.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 @@ -428,7 +428,7 @@ class _FortuneSettingsPageState extends ConsumerState { Expanded( child: Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), CupertinoSwitch(value: value, onChanged: onChanged), @@ -463,13 +463,13 @@ class _FortuneSettingsPageState extends ConsumerState { Expanded( child: Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), Flexible( child: Text( value, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), overflow: TextOverflow.ellipsis, ), ), @@ -500,7 +500,7 @@ class _FortuneSettingsPageState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Wrap( @@ -527,7 +527,7 @@ class _FortuneSettingsPageState extends ConsumerState { ), child: Text( displayBuilder(opt), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 @@ -619,7 +619,7 @@ class _FortuneSettingsPageState extends ConsumerState { return Center( child: Text( c, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/daily_fortune/presentation/widgets/fortune_card_widget.dart b/lib/features/daily_fortune/presentation/widgets/fortune_card_widget.dart index b71c09dc..238299d0 100644 --- a/lib/features/daily_fortune/presentation/widgets/fortune_card_widget.dart +++ b/lib/features/daily_fortune/presentation/widgets/fortune_card_widget.dart @@ -194,7 +194,7 @@ class _AncientCard extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm), child: Text( '✦ 签 ✦', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _gold.withValues(alpha: isDark ? 0.6 : 0.8), fontWeight: FontWeight.w600, letterSpacing: 2, @@ -238,7 +238,7 @@ class _AncientCard extends StatelessWidget { Widget _buildSignRank(bool isDark) { return Text( record.signRank, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _gold.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w600, letterSpacing: 4, @@ -249,7 +249,7 @@ class _AncientCard extends StatelessWidget { Widget _buildScoreText(bool isDark) { return Text( '综合运势 ${record.fortuneScore} 分', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: _goldDark.withValues(alpha: isDark ? 0.6 : 0.8), ), ); @@ -272,7 +272,7 @@ class _AncientCard extends StatelessWidget { child: Text( record.signText, textAlign: TextAlign.center, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: _goldLight.withValues(alpha: isDark ? 0.85 : 1), height: 1.9, fontFamily: 'serif', @@ -331,14 +331,14 @@ class _AncientCard extends StatelessWidget { Expanded( child: Text( dim.name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _gold.withValues(alpha: isDark ? 0.6 : 0.7), ), ), ), Text( dim.level.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _gold.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w500, ), @@ -404,13 +404,13 @@ class _AncientCard extends StatelessWidget { const SizedBox(height: 2), Text( item.$2, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _goldDark.withValues(alpha: isDark ? 0.5 : 0.6), ), ), Text( item.$3, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _goldLight.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w500, ), @@ -460,7 +460,7 @@ class _AncientCard extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: accentColor, fontWeight: FontWeight.w700, ), @@ -480,7 +480,7 @@ class _AncientCard extends StatelessWidget { ), child: Text( item, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: label == '宜' ? const Color(0xFF81C784) : const Color(0xFFEF9A9A), @@ -498,7 +498,7 @@ class _AncientCard extends StatelessWidget { return Text( record.date, textAlign: TextAlign.center, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _goldDark.withValues(alpha: isDark ? 0.35 : 0.5), letterSpacing: 1, ), @@ -604,7 +604,7 @@ class _WechatCard extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '📊 今日运势', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _blue.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w600, ), @@ -633,7 +633,7 @@ class _WechatCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( record.signRank, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _blue.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w600, ), @@ -641,7 +641,7 @@ class _WechatCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( '综合运势 ${record.fortuneScore} 分', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: const Color(0xFF546E7A), ), ), @@ -663,7 +663,7 @@ class _WechatCard extends StatelessWidget { child: Text( record.signText, textAlign: TextAlign.center, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: _bluePale.withValues(alpha: isDark ? 0.9 : 1), height: 1.8, ), @@ -721,14 +721,14 @@ class _WechatCard extends StatelessWidget { Expanded( child: Text( dim.name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _blue.withValues(alpha: isDark ? 0.6 : 0.7), ), ), ), Text( dim.level.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _blueLight.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w500, ), @@ -794,7 +794,7 @@ class _WechatCard extends StatelessWidget { const SizedBox(height: 2), Text( item.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _bluePale.withValues(alpha: isDark ? 0.8 : 1), fontWeight: FontWeight.w500, ), @@ -840,7 +840,7 @@ class _WechatCard extends StatelessWidget { color: accentColor, ), const SizedBox(width: 4), - Text(label, style: AppTypography.of(context).caption1.copyWith(color: accentColor, fontWeight: FontWeight.w700)), + Text(label, style: AppTypography.caption1.copyWith(color: accentColor, fontWeight: FontWeight.w700)), ], ), const SizedBox(height: AppSpacing.xs), @@ -856,7 +856,7 @@ class _WechatCard extends StatelessWidget { ), child: Text( item, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: label == '宜' ? const Color(0xFF81C784) : const Color(0xFFEF9A9A), ), ), @@ -872,7 +872,7 @@ class _WechatCard extends StatelessWidget { return Text( record.date, textAlign: TextAlign.center, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: const Color(0xFF546E7A).withValues(alpha: isDark ? 0.5 : 0.7), letterSpacing: 1, ), @@ -1005,7 +1005,7 @@ class _AppleCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( record.signRank, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: const Color(0xFF8E8E93), fontWeight: FontWeight.w600, ), @@ -1013,7 +1013,7 @@ class _AppleCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( '综合运势 ${record.fortuneScore} 分', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: const Color(0xFFAEAEB2), ), ), @@ -1032,7 +1032,7 @@ class _AppleCard extends StatelessWidget { child: Text( record.signText, textAlign: TextAlign.center, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.8, ), @@ -1087,14 +1087,14 @@ class _AppleCard extends StatelessWidget { Expanded( child: Text( dim.name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: const Color(0xFF8E8E93), ), ), ), Text( dim.level.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1160,7 +1160,7 @@ class _AppleCard extends StatelessWidget { const SizedBox(height: 2), Text( item.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1206,7 +1206,7 @@ class _AppleCard extends StatelessWidget { color: accentColor, ), const SizedBox(width: 4), - Text(label, style: AppTypography.of(context).caption1.copyWith(color: accentColor, fontWeight: FontWeight.w700)), + Text(label, style: AppTypography.caption1.copyWith(color: accentColor, fontWeight: FontWeight.w700)), ], ), const SizedBox(height: AppSpacing.xs), @@ -1222,7 +1222,7 @@ class _AppleCard extends StatelessWidget { ), child: Text( item, - style: AppTypography.of(context).caption2.copyWith(color: accentColor), + style: AppTypography.caption2.copyWith(color: accentColor), ), ); }).toList(), @@ -1236,7 +1236,7 @@ class _AppleCard extends StatelessWidget { return Text( record.date, textAlign: TextAlign.center, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: const Color(0xFFAEAEB2), letterSpacing: 1, ), diff --git a/lib/features/discover/presentation/category_browse_section.dart b/lib/features/discover/presentation/category_browse_section.dart index e5d34693..703b9620 100644 --- a/lib/features/discover/presentation/category_browse_section.dart +++ b/lib/features/discover/presentation/category_browse_section.dart @@ -47,7 +47,7 @@ class CategoryBrowseSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '分类浏览', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -55,7 +55,7 @@ class CategoryBrowseSection extends ConsumerWidget { const Spacer(), Text( '${state.sources.length}个分类', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -96,7 +96,7 @@ class CategoryBrowseSection extends ConsumerWidget { ), Text( source.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -105,7 +105,7 @@ class CategoryBrowseSection extends ConsumerWidget { const SizedBox(width: 4), Text( _formatCount(source.count), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: typeColor, fontSize: 10, ), @@ -140,7 +140,7 @@ class CategoryBrowseSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '分类浏览', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), diff --git a/lib/features/discover/presentation/category_detail_page.dart b/lib/features/discover/presentation/category_detail_page.dart index 596474a4..8a716318 100644 --- a/lib/features/discover/presentation/category_detail_page.dart +++ b/lib/features/discover/presentation/category_detail_page.dart @@ -145,7 +145,7 @@ class _CategoryDetailPageState extends ConsumerState { ), Text( widget.name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -153,7 +153,7 @@ class _CategoryDetailPageState extends ConsumerState { const Spacer(), Text( '${_items.length}条', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -172,7 +172,7 @@ class _CategoryDetailPageState extends ConsumerState { children: [ const Text('😟', style: TextStyle(fontSize: 48)), const SizedBox(height: AppSpacing.md), - Text(_error!, style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary)), + Text(_error!, style: AppTypography.subhead.copyWith(color: ext.textSecondary)), const SizedBox(height: AppSpacing.sm), CupertinoButton(onPressed: _loadData, child: const Text('重试')), ], @@ -187,7 +187,7 @@ class _CategoryDetailPageState extends ConsumerState { children: [ const Text('📭', style: TextStyle(fontSize: 48)), const SizedBox(height: AppSpacing.md), - Text('暂无内容', style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary)), + Text('暂无内容', style: AppTypography.title3.copyWith(color: ext.textSecondary)), ], ), ); @@ -225,7 +225,7 @@ class _CategoryDetailPageState extends ConsumerState { if (item.title.isNotEmpty) Text( item.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -235,7 +235,7 @@ class _CategoryDetailPageState extends ConsumerState { if (item.title.isNotEmpty) const SizedBox(height: AppSpacing.xs), Text( item.content.isNotEmpty ? item.content : item.summary, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -248,19 +248,19 @@ class _CategoryDetailPageState extends ConsumerState { if (item.author.isNotEmpty) ...[ Text( item.author, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.sm), ], const Spacer(), Text( '👁 ${_formatCount(item.views)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.sm), Text( '👍 ${_formatCount(item.likeCount)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/discover/presentation/daily_read_section.dart b/lib/features/discover/presentation/daily_read_section.dart index a9f6aae0..0a7620f7 100644 --- a/lib/features/discover/presentation/daily_read_section.dart +++ b/lib/features/discover/presentation/daily_read_section.dart @@ -60,7 +60,7 @@ class DailyReadSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '今日一读', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -76,7 +76,7 @@ class DailyReadSection extends ConsumerWidget { const SizedBox(width: 4), Text( '换一篇', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -120,7 +120,7 @@ class DailyReadSection extends ConsumerWidget { ), Text( item.feedName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: typeColor, fontWeight: FontWeight.w600, fontSize: 11, @@ -133,7 +133,7 @@ class DailyReadSection extends ConsumerWidget { if (item.author.isNotEmpty) Text( item.author, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -141,7 +141,7 @@ class DailyReadSection extends ConsumerWidget { if (item.title.isNotEmpty) Text( item.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -151,7 +151,7 @@ class DailyReadSection extends ConsumerWidget { if (item.title.isNotEmpty) const SizedBox(height: AppSpacing.sm), Text( _stripHtml(item.content.isNotEmpty ? item.content : item.summary), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.7, ), @@ -202,7 +202,7 @@ class DailyReadSection extends ConsumerWidget { const SizedBox(width: 3), Text( text, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -219,7 +219,7 @@ class DailyReadSection extends ConsumerWidget { children: [ Text( '关联阅读', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -239,7 +239,7 @@ class DailyReadSection extends ConsumerWidget { children: [ Text( item.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -259,7 +259,7 @@ class DailyReadSection extends ConsumerWidget { ), child: Text( item.feedName, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: typeColor, fontSize: 10, ), @@ -269,7 +269,7 @@ class DailyReadSection extends ConsumerWidget { if (item.author.isNotEmpty) Text( item.author, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -302,7 +302,7 @@ class DailyReadSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '今日一读', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -365,7 +365,7 @@ class DailyReadSection extends ConsumerWidget { const SizedBox(height: AppSpacing.sm), Text( '暂无推荐内容', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ); diff --git a/lib/features/discover/presentation/discover_page.dart b/lib/features/discover/presentation/discover_page.dart index b46a24d7..a0326380 100644 --- a/lib/features/discover/presentation/discover_page.dart +++ b/lib/features/discover/presentation/discover_page.dart @@ -70,7 +70,7 @@ class DiscoverPage extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '灵感', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), diff --git a/lib/features/file_transfer/collaboration/canvas/pages/canvas_page.dart b/lib/features/file_transfer/collaboration/canvas/pages/canvas_page.dart index 843d2d1f..3ae97670 100644 --- a/lib/features/file_transfer/collaboration/canvas/pages/canvas_page.dart +++ b/lib/features/file_transfer/collaboration/canvas/pages/canvas_page.dart @@ -92,7 +92,7 @@ class _CanvasPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '协作画布', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -232,7 +232,7 @@ class _CanvasPageState extends ConsumerState { const SizedBox(width: 4), Text( '$count', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -274,7 +274,7 @@ class _CanvasPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '实时同步中', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontWeight: FontWeight.w500, ), @@ -304,7 +304,7 @@ class _CanvasPageState extends ConsumerState { const SizedBox(width: 4), Text( '同步画布', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -316,7 +316,7 @@ class _CanvasPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '${canvasState.strokes.length} 笔画', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/file_transfer/collaboration/canvas/widgets/canvas_toolbar.dart b/lib/features/file_transfer/collaboration/canvas/widgets/canvas_toolbar.dart index 11726d12..27e2595d 100644 --- a/lib/features/file_transfer/collaboration/canvas/widgets/canvas_toolbar.dart +++ b/lib/features/file_transfer/collaboration/canvas/widgets/canvas_toolbar.dart @@ -190,7 +190,7 @@ class CanvasToolbar extends StatelessWidget { Widget _buildWidthSlider(AppThemeExtension ext) { return Row( children: [ - Text('细', style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text('细', style: AppTypography.caption2.copyWith(color: ext.textHint)), Expanded( child: CupertinoSlider( value: currentWidth, @@ -200,7 +200,7 @@ class CanvasToolbar extends StatelessWidget { onChanged: (v) => onWidthChanged?.call(v), ), ), - Text('粗', style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text('粗', style: AppTypography.caption2.copyWith(color: ext.textHint)), const SizedBox(width: AppSpacing.sm), Container( width: currentWidth.clamp(4, 20) + 4, diff --git a/lib/features/file_transfer/collaboration/clipboard/pages/clipboard_flow_page.dart b/lib/features/file_transfer/collaboration/clipboard/pages/clipboard_flow_page.dart index c1a9df68..07e77a1a 100644 --- a/lib/features/file_transfer/collaboration/clipboard/pages/clipboard_flow_page.dart +++ b/lib/features/file_transfer/collaboration/clipboard/pages/clipboard_flow_page.dart @@ -58,7 +58,7 @@ class _ClipboardFlowPageState extends ConsumerState { const SizedBox(width: 4), Text( '剪贴板', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -111,7 +111,7 @@ class _ClipboardFlowPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '🔄 同步中…', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -144,8 +144,8 @@ class _ClipboardFlowPageState extends ConsumerState { child: CupertinoTextField( controller: _searchController, placeholder: '搜索剪贴板内容…', - placeholderStyle: AppTypography.of(context).subhead.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.subhead.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm, @@ -191,7 +191,7 @@ class _ClipboardFlowPageState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? CupertinoColors.white : ext.textSecondary, @@ -215,7 +215,7 @@ class _ClipboardFlowPageState extends ConsumerState { ), child: Text( '$count', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isSelected ? CupertinoColors.white : ext.textHint, @@ -242,12 +242,12 @@ class _ClipboardFlowPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无剪贴板记录', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '复制内容后自动同步到此处', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.lg), CupertinoButton( @@ -305,7 +305,7 @@ class _ClipboardFlowPageState extends ConsumerState { Expanded( child: Text( item.type == ClipboardItemType.text ? '📝 文本' : '🖼️ 图片', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -318,7 +318,7 @@ class _ClipboardFlowPageState extends ConsumerState { ), Text( item.createdAt.timeAgo, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -326,7 +326,7 @@ class _ClipboardFlowPageState extends ConsumerState { if (item.type == ClipboardItemType.text) Text( item.textContent ?? '', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), maxLines: 3, overflow: TextOverflow.ellipsis, ) @@ -344,7 +344,7 @@ class _ClipboardFlowPageState extends ConsumerState { const SizedBox(width: 4), Text( item.displayDeviceName, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -385,7 +385,7 @@ class _ClipboardFlowPageState extends ConsumerState { child: Center( child: Text( '图片不可用', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ); @@ -446,7 +446,7 @@ class _ClipboardFlowPageState extends ConsumerState { const SizedBox(width: 6), Text( '📋 粘贴并同步', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textOnAccent, ), ), diff --git a/lib/features/file_transfer/collaboration/screen_share/pages/screen_share_page.dart b/lib/features/file_transfer/collaboration/screen_share/pages/screen_share_page.dart index 560a6d5c..4ca89648 100644 --- a/lib/features/file_transfer/collaboration/screen_share/pages/screen_share_page.dart +++ b/lib/features/file_transfer/collaboration/screen_share/pages/screen_share_page.dart @@ -78,7 +78,7 @@ class _ScreenSharePageState extends ConsumerState { : state.isViewing ? '观看中' : '屏幕共享', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -123,7 +123,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: 4), Text( state.durationDisplay, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: state.isPaused ? ext.warningColor : ext.successColor, fontWeight: FontWeight.w600, fontFeatures: const [FontFeature.tabularFigures()], @@ -150,7 +150,7 @@ class _ScreenSharePageState extends ConsumerState { ), child: Text( '结束', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.errorColor, fontWeight: FontWeight.w600, ), @@ -200,7 +200,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '帧: ${state.frameCount}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontFeatures: const [FontFeature.tabularFigures()], ), @@ -209,12 +209,12 @@ class _ScreenSharePageState extends ConsumerState { if (frame != null) Text( '${frame.width}×${frame.height}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.sm), Text( '${sizeKb}KB', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const Spacer(), Container( @@ -228,7 +228,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: 4), Text( 'InApp', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontWeight: FontWeight.w600, ), @@ -265,7 +265,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '已用: ${state.durationDisplay}', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontFeatures: const [FontFeature.tabularFigures()], ), @@ -273,7 +273,7 @@ class _ScreenSharePageState extends ConsumerState { const Spacer(), Text( '剩余: $remaining', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: progress > 0.8 ? ext.warningColor : ext.textSecondary, fontWeight: progress > 0.8 ? FontWeight.w600 @@ -329,7 +329,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '正在共享屏幕...', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), CupertinoActivityIndicator(color: ext.accent), @@ -356,7 +356,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '正在接收对方屏幕...', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), CupertinoActivityIndicator(color: ext.accent), @@ -420,7 +420,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '帧解码失败', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -497,7 +497,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( zone.label, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: CupertinoColors.white, ), ), @@ -524,7 +524,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '共享已暂停', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -548,7 +548,7 @@ class _ScreenSharePageState extends ConsumerState { children: [ Text( '👆 可操作区域', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -578,7 +578,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: 3), Text( zone.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -618,7 +618,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '结束观看', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -688,7 +688,7 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( label, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: color, fontWeight: FontWeight.w600, ), @@ -708,13 +708,13 @@ class _ScreenSharePageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '屏幕共享', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '共享你的屏幕或观看对方屏幕\n仅限热区操作,安全可控', textAlign: TextAlign.center, - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xl), CupertinoButton( @@ -723,7 +723,7 @@ class _ScreenSharePageState extends ConsumerState { onPressed: () => Navigator.pop(context), child: Text( '返回', - style: AppTypography.of(context).body.copyWith(color: ext.textOnAccent), + style: AppTypography.body.copyWith(color: ext.textOnAccent), ), ), ], diff --git a/lib/features/file_transfer/presentation/pages/device_pairing_page.dart b/lib/features/file_transfer/presentation/pages/device_pairing_page.dart index e0640105..eb348513 100644 --- a/lib/features/file_transfer/presentation/pages/device_pairing_page.dart +++ b/lib/features/file_transfer/presentation/pages/device_pairing_page.dart @@ -70,7 +70,7 @@ class _DevicePairingPageState extends ConsumerState const SizedBox(width: AppSpacing.xs), Text( '配对设备', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -118,10 +118,10 @@ class _DevicePairingPageState extends ConsumerState ), labelColor: ext.accent, unselectedLabelColor: ext.textSecondary, - labelStyle: AppTypography.of(context).caption1.copyWith( + labelStyle: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, ), - unselectedLabelStyle: AppTypography.of(context).caption1, + unselectedLabelStyle: AppTypography.caption1, dividerColor: Colors.transparent, tabs: const [ Tab(icon: Icon(CupertinoIcons.number, size: 16), text: '配对码'), @@ -158,7 +158,7 @@ class _DevicePairingPageState extends ConsumerState children: [ Text( '其他配对方式', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.lg), _buildOtherMethodCard( @@ -283,7 +283,7 @@ class _DevicePairingPageState extends ConsumerState children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: available ? ext.textPrimary : ext.textDisabled, fontWeight: FontWeight.w600, ), @@ -291,7 +291,7 @@ class _DevicePairingPageState extends ConsumerState const SizedBox(height: 2), Text( displaySubtitle, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: available ? ext.textSecondary : ext.textDisabled, ), ), @@ -299,7 +299,7 @@ class _DevicePairingPageState extends ConsumerState const SizedBox(height: 4), Text( '💡 $alternativeMethod', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent.withValues(alpha: 0.8), ), ), @@ -326,7 +326,7 @@ class _DevicePairingPageState extends ConsumerState showCupertinoDialog( context: context, builder: (ctx) => CupertinoAlertDialog( - title: Text('手动IP配对', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + title: Text('手动IP配对', style: AppTypography.headline.copyWith(color: ext.textPrimary)), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.md), child: Column( @@ -334,8 +334,8 @@ class _DevicePairingPageState extends ConsumerState CupertinoTextField( controller: ipController, placeholder: '192.168.1.100', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgCard, borderRadius: AppRadius.mdBorder, @@ -350,8 +350,8 @@ class _DevicePairingPageState extends ConsumerState CupertinoTextField( controller: portController, placeholder: '53317', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgCard, borderRadius: AppRadius.mdBorder, @@ -410,7 +410,7 @@ class _DevicePairingPageState extends ConsumerState padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( message, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_debug_panel.dart b/lib/features/file_transfer/presentation/pages/file_transfer_debug_panel.dart index 9ad8be65..175832e0 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_debug_panel.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_debug_panel.dart @@ -44,7 +44,7 @@ mixin FileTransferDebugPanel builder: (ctx) => CupertinoActionSheet( title: Text( '🐛 调试面板', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), actions: [ CupertinoActionSheetAction( diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_device_actions.dart b/lib/features/file_transfer/presentation/pages/file_transfer_device_actions.dart index f26e3773..3fe18bf8 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_device_actions.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_device_actions.dart @@ -49,11 +49,11 @@ mixin FileTransferDeviceActions builder: (ctx) => CupertinoActionSheet( title: Text( '${device.displayEmoji} $displayName', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), message: Text( '${device.displayInfo}\n${device.displayStatus}\n传输方式: ${device.displayTransport}', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( @@ -142,7 +142,7 @@ mixin FileTransferDeviceActions child: CupertinoTextField( controller: controller, placeholder: '输入新名称', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary, borderRadius: AppRadius.mdBorder, @@ -237,7 +237,7 @@ mixin FileTransferDeviceActions width: 72, child: Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -246,7 +246,7 @@ mixin FileTransferDeviceActions Expanded( child: Text( value, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -286,7 +286,7 @@ mixin FileTransferDeviceActions ? Center( child: Text( '暂无记录', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), ) : ListView.builder( @@ -299,7 +299,7 @@ mixin FileTransferDeviceActions leading: Text(msg.type.emoji), title: Text( msg.displayContent, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -307,7 +307,7 @@ mixin FileTransferDeviceActions ), subtitle: Text( _formatTime(msg.timestamp), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -413,7 +413,7 @@ mixin FileTransferDeviceActions Flexible( child: Text( displayAlias, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -425,7 +425,7 @@ mixin FileTransferDeviceActions const SizedBox(height: AppSpacing.xs), Text( '让对方扫描此二维码即可配对', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textHint, ), textAlign: TextAlign.center, @@ -442,7 +442,7 @@ mixin FileTransferDeviceActions ), child: Text( '⏱ 二维码有效期 ${QrPairingService.qrExpiry.inMinutes} 分钟', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -579,7 +579,7 @@ mixin FileTransferDeviceActions children: [ Text( displayName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -596,7 +596,7 @@ mixin FileTransferDeviceActions ), child: Text( '📱 本机', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -607,7 +607,7 @@ mixin FileTransferDeviceActions if (device.hasIpCity) Text( device.displayLocation, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -674,7 +674,7 @@ mixin FileTransferDeviceActions Flexible( child: Text( displayName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -695,7 +695,7 @@ mixin FileTransferDeviceActions ), child: Text( '🟢 在线', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGreen, ), ), @@ -712,7 +712,7 @@ mixin FileTransferDeviceActions ), child: Text( device.displayLocation, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -725,7 +725,7 @@ mixin FileTransferDeviceActions ), child: Text( '👤 ${device.accountAlias}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -798,7 +798,7 @@ mixin FileTransferDeviceActions const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: onTap != null ? ext.accent : ext.textHint, ), ), diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_discovery_tab.dart b/lib/features/file_transfer/presentation/pages/file_transfer_discovery_tab.dart index b6d8a86f..bcc4e7f2 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_discovery_tab.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_discovery_tab.dart @@ -104,7 +104,7 @@ mixin FileTransferDiscoveryTab children: [ Text( '局域网访问', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -112,7 +112,7 @@ mixin FileTransferDiscoveryTab const SizedBox(height: 2), Text( lanUrl, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -161,7 +161,7 @@ mixin FileTransferDiscoveryTab ), Text( '局域网访问', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -190,7 +190,7 @@ mixin FileTransferDiscoveryTab const SizedBox(height: AppSpacing.md), Text( lanUrl, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -199,7 +199,7 @@ mixin FileTransferDiscoveryTab const SizedBox(height: AppSpacing.sm), Text( '📱 其他设备扫描此二维码即可在浏览器中访问文件传输页面', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.lg), @@ -224,7 +224,7 @@ mixin FileTransferDiscoveryTab const SizedBox(width: AppSpacing.xs), Text( '复制链接', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, ), ), @@ -253,7 +253,7 @@ mixin FileTransferDiscoveryTab Expanded( child: Text( discoveryState.isScanning ? '正在扫描附近设备...' : '附近设备', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -298,7 +298,7 @@ mixin FileTransferDiscoveryTab ], Text( discoveryState.isScanning ? '停止扫描' : '开始扫描', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: discoveryState.isScanning ? ext.textSecondary : CupertinoColors.white, @@ -324,7 +324,7 @@ mixin FileTransferDiscoveryTab const SizedBox(width: AppSpacing.xs), Text( '手动', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ], ), @@ -372,7 +372,7 @@ mixin FileTransferDiscoveryTab const SizedBox(width: 2), Text( method.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? ext.accent : ext.textSecondary, ), ), @@ -404,12 +404,12 @@ mixin FileTransferDiscoveryTab const SizedBox(height: AppSpacing.md), Text( state.isScanning ? '正在搜索附近设备...' : '暂无发现设备', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( state.isScanning ? '请确保对方设备已开启传输服务' : '点击"开始扫描"搜索附近设备', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), if (!state.isScanning) ...[ const SizedBox(height: AppSpacing.lg), @@ -428,7 +428,7 @@ mixin FileTransferDiscoveryTab const SizedBox(width: AppSpacing.xs), Text( '手动配对', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, ), ), diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_my_devices_tab.dart b/lib/features/file_transfer/presentation/pages/file_transfer_my_devices_tab.dart index 6a8d2cb5..e03d20e6 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_my_devices_tab.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_my_devices_tab.dart @@ -43,7 +43,7 @@ mixin FileTransferMyDevicesTab const SizedBox(width: AppSpacing.xs), Text( '我的设备', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -82,7 +82,7 @@ mixin FileTransferMyDevicesTab const SizedBox(width: 4), Text( '刷新', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), @@ -101,7 +101,7 @@ mixin FileTransferMyDevicesTab Flexible( child: Text( isSearching ? '正在搜索同账号在线设备...' : '同一账号下的在线设备,可跨网络互传文件', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: isSearching ? ext.accent : ext.textHint, ), ), @@ -122,7 +122,7 @@ mixin FileTransferMyDevicesTab const SizedBox(height: AppSpacing.md), Text( '正在搜索你的其他设备...', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -157,12 +157,12 @@ mixin FileTransferMyDevicesTab const SizedBox(height: AppSpacing.md), Text( '暂无其他在线设备', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '登录同一账号的其他设备将自动显示在此', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.lg), CupertinoButton( @@ -182,7 +182,7 @@ mixin FileTransferMyDevicesTab const SizedBox(width: AppSpacing.xs), Text( '搜索我的设备', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, ), ), diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_page.dart b/lib/features/file_transfer/presentation/pages/file_transfer_page.dart index 59e5c009..b6a4b7bd 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_page.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_page.dart @@ -84,7 +84,7 @@ class _FileTransferPageState extends ConsumerState const SizedBox(width: AppSpacing.xs), Text( '文件传输助手', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -146,8 +146,8 @@ class _FileTransferPageState extends ConsumerState ), labelColor: ext.accent, unselectedLabelColor: ext.textSecondary, - labelStyle: AppTypography.of(context).subhead.copyWith(fontWeight: FontWeight.w600), - unselectedLabelStyle: AppTypography.of(context).subhead, + labelStyle: AppTypography.subhead.copyWith(fontWeight: FontWeight.w600), + unselectedLabelStyle: AppTypography.subhead, dividerColor: Colors.transparent, tabs: const [ Tab(icon: Icon(CupertinoIcons.search, size: 18), text: '发现'), diff --git a/lib/features/file_transfer/presentation/pages/file_transfer_records_tab.dart b/lib/features/file_transfer/presentation/pages/file_transfer_records_tab.dart index 3baa9ca1..c432ff55 100644 --- a/lib/features/file_transfer/presentation/pages/file_transfer_records_tab.dart +++ b/lib/features/file_transfer/presentation/pages/file_transfer_records_tab.dart @@ -51,7 +51,7 @@ mixin FileTransferRecordsTab const SizedBox(width: AppSpacing.xs), Text( '传输中 (${activeTasks.length})', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -97,7 +97,7 @@ mixin FileTransferRecordsTab const SizedBox(width: AppSpacing.xs), Text( '已完成 (${completed.length})', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -132,7 +132,7 @@ mixin FileTransferRecordsTab const SizedBox(width: AppSpacing.xs), Text( '失败 (${failed.length})', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -180,7 +180,7 @@ mixin FileTransferRecordsTab const SizedBox(width: AppSpacing.xs), Text( '传输中', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -190,7 +190,7 @@ mixin FileTransferRecordsTab const Spacer(), Text( state.overallSpeedText, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -209,7 +209,7 @@ mixin FileTransferRecordsTab const SizedBox(height: AppSpacing.xs), Text( '${state.activeCount} 个任务 · ${(state.overallProgress * 100).toStringAsFixed(0)}%', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/file_transfer/presentation/pages/pairing_code_tab.dart b/lib/features/file_transfer/presentation/pages/pairing_code_tab.dart index ae810807..63979d1d 100644 --- a/lib/features/file_transfer/presentation/pages/pairing_code_tab.dart +++ b/lib/features/file_transfer/presentation/pages/pairing_code_tab.dart @@ -136,16 +136,16 @@ class _PairingCodeTabState extends ConsumerState { title: Row( mainAxisSize: MainAxisSize.min, children: [ - Text('🎉', style: AppTypography.of(context).title2), + Text('🎉', style: AppTypography.title2), const SizedBox(width: AppSpacing.sm), - Text('配对成功', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text('配对成功', style: AppTypography.headline.copyWith(color: ext.textPrimary)), ], ), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '已与 $peerAlias 建立连接', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -251,7 +251,7 @@ class _PairingCodeTabState extends ConsumerState { title: const Text('✅ 已复制'), content: Text( '配对码 $_generatedCode 已复制到剪贴板', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), actions: [ CupertinoDialogAction( @@ -275,7 +275,7 @@ class _PairingCodeTabState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( message, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -334,14 +334,14 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '生成配对码', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), const SizedBox(height: AppSpacing.sm), Text( '生成配对码,让对方输入即可配对', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.lg), if (_generatedCode != null) @@ -357,7 +357,7 @@ class _PairingCodeTabState extends ConsumerState { ? CupertinoActivityIndicator(color: ext.textOnAccent) : Text( '🔑 生成配对码', - style: AppTypography.of(context).subhead.copyWith(color: ext.textOnAccent), + style: AppTypography.subhead.copyWith(color: ext.textOnAccent), ), ), ), @@ -376,7 +376,7 @@ class _PairingCodeTabState extends ConsumerState { children: [ Text( '配对码', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -424,7 +424,7 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( _formatCountdown(_countdownSeconds), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: _countdownSeconds < 60 ? ext.errorColor : ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -434,7 +434,7 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '⏳ 等待对方输入...', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -449,7 +449,7 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '复制配对码', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -467,7 +467,7 @@ class _PairingCodeTabState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( '或', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), Expanded(child: Container(height: 0.5, color: ext.bgElevated)), @@ -495,14 +495,14 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '输入配对码', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), const SizedBox(height: AppSpacing.sm), Text( '输入对方提供的4位数字配对码', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.lg), Row( @@ -562,13 +562,13 @@ class _PairingCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '配对中...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textOnAccent), + style: AppTypography.subhead.copyWith(color: ext.textOnAccent), ), ], ) : Text( '🔗 配对连接', - style: AppTypography.of(context).subhead.copyWith(color: ext.textOnAccent), + style: AppTypography.subhead.copyWith(color: ext.textOnAccent), ), ), ), diff --git a/lib/features/file_transfer/presentation/pages/qr_code_tab.dart b/lib/features/file_transfer/presentation/pages/qr_code_tab.dart index 3dbd93d8..7d7a8674 100644 --- a/lib/features/file_transfer/presentation/pages/qr_code_tab.dart +++ b/lib/features/file_transfer/presentation/pages/qr_code_tab.dart @@ -93,16 +93,16 @@ class _QrCodeTabState extends ConsumerState { title: Row( mainAxisSize: MainAxisSize.min, children: [ - Text('🎉', style: AppTypography.of(context).title2), + Text('🎉', style: AppTypography.title2), const SizedBox(width: AppSpacing.sm), - Text('配对成功', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text('配对成功', style: AppTypography.headline.copyWith(color: ext.textPrimary)), ], ), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '已与 $peerAlias 建立连接', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -159,21 +159,21 @@ class _QrCodeTabState extends ConsumerState { showCupertinoDialog( context: context, builder: (ctx) => CupertinoAlertDialog( - title: Text('手动输入配对码', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + title: Text('手动输入配对码', style: AppTypography.headline.copyWith(color: ext.textPrimary)), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.md), child: Column( children: [ Text( '请输入对方设备显示的配对码', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoTextField( controller: _manualCodeController, placeholder: '输入配对码', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgCard, borderRadius: AppRadius.mdBorder, @@ -264,12 +264,12 @@ class _QrCodeTabState extends ConsumerState { showCupertinoDialog( context: context, builder: (ctx) => CupertinoAlertDialog( - title: Text('📱 已扫描', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + title: Text('📱 已扫描', style: AppTypography.headline.copyWith(color: ext.textPrimary)), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '正在等待对方确认配对...', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -302,7 +302,7 @@ class _QrCodeTabState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( message, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -347,12 +347,12 @@ class _QrCodeTabState extends ConsumerState { children: [ Text( '我的配对码', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '让对方扫描此二维码即可配对', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.lg), GlassContainer( @@ -378,7 +378,7 @@ class _QrCodeTabState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '未连接信令服务器', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ], ), @@ -392,7 +392,7 @@ class _QrCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '二维码已就绪', - style: AppTypography.of(context).caption1.copyWith(color: ext.successColor), + style: AppTypography.caption1.copyWith(color: ext.successColor), ), ], ), @@ -420,7 +420,7 @@ class _QrCodeTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( isWebPlatform ? '⌨️ 手动输入配对码' : '📷 扫描二维码', - style: AppTypography.of(context).subhead.copyWith(color: ext.textOnAccent), + style: AppTypography.subhead.copyWith(color: ext.textOnAccent), ), ], ), @@ -459,7 +459,7 @@ class _QrCodeTabState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '将二维码放入框内自动扫描', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.lg), CupertinoButton( @@ -468,7 +468,7 @@ class _QrCodeTabState extends ConsumerState { onPressed: _stopScan, child: Text( '取消扫描', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], @@ -500,7 +500,7 @@ class _QrCodeTabState extends ConsumerState { children: [ Text( '💡 提示', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -516,11 +516,11 @@ class _QrCodeTabState extends ConsumerState { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('• ', style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary)), + Text('• ', style: AppTypography.footnote.copyWith(color: ext.textSecondary)), Expanded( child: Text( tip, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), ], diff --git a/lib/features/file_transfer/presentation/pages/radar_scan_tab.dart b/lib/features/file_transfer/presentation/pages/radar_scan_tab.dart index 3fcd81a7..ad9e3195 100644 --- a/lib/features/file_transfer/presentation/pages/radar_scan_tab.dart +++ b/lib/features/file_transfer/presentation/pages/radar_scan_tab.dart @@ -123,11 +123,11 @@ class _RadarScanTabState extends ConsumerState { title: Row( mainAxisSize: MainAxisSize.min, children: [ - Text('🎉', style: AppTypography.of(context).title2), + Text('🎉', style: AppTypography.title2), const SizedBox(width: AppSpacing.sm), Text( '配对成功', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -137,7 +137,7 @@ class _RadarScanTabState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '已与 $peerAlias 建立连接', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -217,13 +217,13 @@ class _RadarScanTabState extends ConsumerState { builder: (ctx) => CupertinoAlertDialog( title: Text( '🔗 配对请求', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), content: Padding( padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '是否与 $alias 配对?', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -265,7 +265,7 @@ class _RadarScanTabState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( message, - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -369,7 +369,7 @@ class _RadarScanTabState extends ConsumerState { bottom: 0, child: Text( _isScanning ? '正在扫描附近设备...' : '点击开始扫描', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -435,7 +435,7 @@ class _RadarScanTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '📡 开始扫描', - style: AppTypography.of(context).subhead.copyWith(color: ext.textOnAccent), + style: AppTypography.subhead.copyWith(color: ext.textOnAccent), ), ], ), @@ -457,7 +457,7 @@ class _RadarScanTabState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '扫描中... 点击停止', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ], ), @@ -476,7 +476,7 @@ class _RadarScanTabState extends ConsumerState { children: [ Text( '发现 ${_radarDevices.length} 台设备', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(width: AppSpacing.sm), Container( @@ -490,7 +490,7 @@ class _RadarScanTabState extends ConsumerState { ), child: Text( '在线', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontWeight: FontWeight.w600, ), @@ -531,7 +531,7 @@ class _RadarScanTabState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -539,7 +539,7 @@ class _RadarScanTabState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -583,7 +583,7 @@ class _RadarScanTabState extends ConsumerState { children: [ Text( alias, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -592,7 +592,7 @@ class _RadarScanTabState extends ConsumerState { const SizedBox(height: 2), Text( '📍 $ipCity', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_bubbles.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_bubbles.dart index 4c9d3920..88940974 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_bubbles.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_bubbles.dart @@ -41,7 +41,7 @@ Widget chatDeviceAlias(TransferMessage msg, AppThemeExtension ext) { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( '${msg.deviceEmoji ?? ""} ${msg.deviceAlias}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -203,7 +203,7 @@ class ChatMessageBubble extends StatelessWidget { default: return SelectableText( msg.displayContent, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ); } } @@ -228,7 +228,7 @@ class ChatTextContent extends StatelessWidget { Flexible( child: SelectableText( msg.content, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), if (!isRemote) ...[ @@ -259,7 +259,7 @@ class ChatProgressContent extends StatelessWidget { children: [ Text( msg.displayContent, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.xs), ClipRRect( @@ -310,7 +310,7 @@ class ChatPairingBubble extends StatelessWidget { Flexible( child: Text( msg.displayContent, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: isSuccess ? ext.successColor : ext.errorColor, ), ), @@ -345,7 +345,7 @@ class ChatSystemMessage extends StatelessWidget { ), child: Text( msg.content, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ), @@ -376,7 +376,7 @@ class DeliveryStatusIndicator extends StatelessWidget { children: [ Text( timeStr, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -508,7 +508,7 @@ class ChatCanvasInviteContent extends StatelessWidget { children: [ Text( '协作画布邀请', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -516,7 +516,7 @@ class ChatCanvasInviteContent extends StatelessWidget { const SizedBox(height: 2), Text( '$peerName 邀请你加入协作画布', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -551,7 +551,7 @@ class ChatCanvasInviteContent extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '加入画布', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_file_content.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_file_content.dart index a32351aa..0220d915 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_file_content.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_file_content.dart @@ -104,7 +104,7 @@ class ChatFileContent extends StatelessWidget { children: [ Text( msg.fileName ?? msg.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: canOpen ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -114,7 +114,7 @@ class ChatFileContent extends StatelessWidget { const SizedBox(height: 2), Text( '${msg.fileSizeText} · ${status.label}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -155,7 +155,7 @@ class ChatFileContent extends StatelessWidget { isPaused ? '已暂停 ${(progress * 100).toStringAsFixed(1)}%' : '${(progress * 100).toStringAsFixed(0)}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isPaused ? ext.warningColor : ext.textHint, ), ), @@ -171,7 +171,7 @@ class ChatFileContent extends StatelessWidget { Expanded( child: Text( msg.errorMessage ?? '传输失败', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.errorColor, ), maxLines: 1, @@ -343,7 +343,7 @@ class ChatControlButton extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: textColor, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_file_send.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_file_send.dart index 2da204f2..3f2824f6 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_file_send.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_file_send.dart @@ -48,7 +48,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { Expanded( child: Text( '首次配对设备,请确认对方身份', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.warningColor, fontWeight: FontWeight.w500, ), @@ -105,7 +105,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { Expanded( child: Text( '${pendingForPeer.length}条消息等待对方上线后发送', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.warningColor, fontWeight: FontWeight.w500, ), @@ -124,7 +124,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { ), child: Text( '查看', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, fontWeight: FontWeight.w600, ), @@ -149,7 +149,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { ), child: Text( '清空', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.errorColor, fontWeight: FontWeight.w600, ), @@ -170,7 +170,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { builder: (ctx) => CupertinoActionSheet( title: Text( '离线暂存队列', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), message: Column( mainAxisSize: MainAxisSize.min, @@ -187,7 +187,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { children: [ Text( item.displayText, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -195,7 +195,7 @@ extension _TransferChatFileSendExt on _TransferChatPageState { ), Text( item.statusDisplayText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_input.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_input.dart index 35ba8e17..5fd33c6c 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_input.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_input.dart @@ -82,8 +82,8 @@ class ChatInputBar extends StatelessWidget { controller: controller, focusNode: focusNode, placeholder: '发送消息或文件...', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary, borderRadius: AppRadius.lgBorder, @@ -171,12 +171,12 @@ class ChatEmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( '与 $deviceAlias 的传输通道', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '$deviceInfo · $deviceTransport', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ], ), @@ -251,7 +251,7 @@ class ChatNetworkStatusBar extends StatelessWidget { const SizedBox(width: 3), Text( peerStatusText!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: healthColor, fontWeight: FontWeight.w500, ), @@ -337,7 +337,7 @@ class ChatLatencyChip extends StatelessWidget { const SizedBox(width: 3), Text( latencyText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color, fontWeight: FontWeight.w600, fontFeatures: const [FontFeature.tabularFigures()], @@ -373,7 +373,7 @@ class ChatHealthBadge extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_media_content.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_media_content.dart index 71937d8e..2f0b5148 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_media_content.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_media_content.dart @@ -127,7 +127,7 @@ class ChatImageContent extends StatelessWidget { const SizedBox(height: 2), Text( '${msg.fileName ?? "图片"} · ${msg.fileSizeText}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -233,7 +233,7 @@ class _ImagePreviewPageState extends State<_ImagePreviewPage> { leading: const AdaptiveBackButton(), middle: Text( '图片预览', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), trailing: Row( mainAxisSize: MainAxisSize.min, @@ -278,14 +278,14 @@ class _ImagePreviewPageState extends State<_ImagePreviewPage> { const SizedBox(height: AppSpacing.sm), Text( '图片加载失败', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), const SizedBox(height: AppSpacing.xs), Text( widget.imagePath, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), textAlign: TextAlign.center, @@ -339,7 +339,7 @@ class _ImagePreviewPageState extends State<_ImagePreviewPage> { ), child: Text( '${(_currentScale * 100).toStringAsFixed(0)}%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textOnAccent, ), ), @@ -498,7 +498,7 @@ class ChatVideoContent extends StatelessWidget { const SizedBox(height: 2), Text( '${msg.fileName ?? "视频"} · ${msg.fileSizeText}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -589,7 +589,7 @@ class _VideoPlayerPageState extends State<_VideoPlayerPage> { ), middle: Text( '视频播放', - style: AppTypography.of(context).headline.copyWith(color: CupertinoColors.white), + style: AppTypography.headline.copyWith(color: CupertinoColors.white), ), ), child: SafeArea( @@ -606,14 +606,14 @@ class _VideoPlayerPageState extends State<_VideoPlayerPage> { const SizedBox(height: AppSpacing.sm), Text( '视频加载失败', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, ), ), const SizedBox(height: AppSpacing.xs), Text( widget.videoPath, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGrey, ), textAlign: TextAlign.center, @@ -678,13 +678,13 @@ class _VideoPlayerPageState extends State<_VideoPlayerPage> { children: [ Text( _formatDuration(_controller.value.position), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, ), ), Text( _formatDuration(_controller.value.duration), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGrey, ), ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_page.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_page.dart index 86e868bf..212dee4e 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_page.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_page.dart @@ -378,7 +378,7 @@ class _TransferChatPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( widget.peerDevice.alias, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(width: AppSpacing.xs), ChatStatusDot(isOnline: widget.peerDevice.isOnline), @@ -408,7 +408,7 @@ class _TransferChatPageState extends ConsumerState { const SizedBox(width: 3), Text( '画布', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -440,7 +440,7 @@ class _TransferChatPageState extends ConsumerState { const SizedBox(width: 3), Text( '屏幕', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.infoColor, fontWeight: FontWeight.w600, ), @@ -554,7 +554,7 @@ class _TransferChatPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '释放以发送文件', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/pages/transfer_chat_screen_share.dart b/lib/features/file_transfer/presentation/pages/transfer_chat_screen_share.dart index 5631c727..9601bc3c 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_chat_screen_share.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_chat_screen_share.dart @@ -39,7 +39,7 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { children: [ Text( '屏幕共享请求', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -47,7 +47,7 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { const SizedBox(height: 2), Text( '${widget.peerDevice.alias} 请求共享屏幕给你观看', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -78,7 +78,7 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { ), child: Text( '拒绝', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.errorColor, fontWeight: FontWeight.w600, ), @@ -102,7 +102,7 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { ), child: Text( '接受', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.successColor, fontWeight: FontWeight.w600, ), @@ -127,11 +127,11 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { builder: (ctx) => CupertinoActionSheet( title: Text( '屏幕共享', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), message: Text( '选择你想要的屏幕共享方式\n(仅共享应用内画面,无需系统权限)', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( @@ -639,13 +639,13 @@ extension _TransferChatScreenShareExt on _TransferChatPageState { builder: (ctx) => CupertinoActionSheet( title: Text( widget.peerDevice.alias, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), message: Text( '${widget.peerDevice.displayInfo}\n' '${widget.peerDevice.displayStatus}\n' '传输方式: ${widget.peerDevice.displayTransport}', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( diff --git a/lib/features/file_transfer/presentation/pages/transfer_settings_page.dart b/lib/features/file_transfer/presentation/pages/transfer_settings_page.dart index 80d61a65..10cd5a96 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_settings_page.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_settings_page.dart @@ -44,7 +44,7 @@ class _TransferSettingsPageState extends ConsumerState { border: null, middle: Text( '传输设置', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ), child: SafeArea( @@ -166,14 +166,14 @@ class _TransferSettingsPageState extends ConsumerState { Expanded( child: Text( '加密算法', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), ), Text( settings.encryptionAlgorithm, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -220,7 +220,7 @@ class _TransferSettingsPageState extends ConsumerState { '• 重新协商密钥后旧消息无法解密\n' '• 重装APP后密钥丢失\n' '建议重要消息同时保留非加密备份', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, height: 1.5, ), @@ -291,7 +291,7 @@ class _TransferSettingsPageState extends ConsumerState { Center( child: Text( '闲言文件传输 v1.0.0', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), const SizedBox(height: AppSpacing.lg), @@ -315,7 +315,7 @@ class _TransferSettingsPageState extends ConsumerState { ), child: Text( title, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -365,12 +365,12 @@ class _TransferSettingsPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), if (subtitle != null) Text( subtitle, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -412,7 +412,7 @@ class _TransferSettingsPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -422,7 +422,7 @@ class _TransferSettingsPageState extends ConsumerState { Flexible( child: Text( value, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), overflow: TextOverflow.ellipsis, ), ), @@ -452,7 +452,7 @@ class _TransferSettingsPageState extends ConsumerState { children: [ Text( '优先传输方式', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Wrap( @@ -484,7 +484,7 @@ class _TransferSettingsPageState extends ConsumerState { const SizedBox(width: 4), Text( t.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -525,7 +525,7 @@ class _TransferSettingsPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '暂无配对设备', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ], ), @@ -558,7 +558,7 @@ class _TransferSettingsPageState extends ConsumerState { onPressed: () => _removeAllPairings(paired.length), child: Text( '🗑️ 删除全部配对 (${paired.length})', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.errorColor, fontWeight: FontWeight.w600, ), @@ -605,11 +605,11 @@ class _TransferSettingsPageState extends ConsumerState { children: [ Text( info.alias, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), Text( '${info.method.label} · ${_formatDate(info.pairedAt)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -645,7 +645,7 @@ class _TransferSettingsPageState extends ConsumerState { child: CupertinoTextField( controller: controller, placeholder: '输入设备名称', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), actions: [ @@ -684,7 +684,7 @@ class _TransferSettingsPageState extends ConsumerState { child: CupertinoTextField( controller: controller, placeholder: '输入下载路径', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), actions: [ @@ -1001,7 +1001,7 @@ class _DebugPanelPageState extends ConsumerState<_DebugPanelPage> border: null, middle: Text( '🐛 调试面板', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ), child: SafeArea( @@ -1036,7 +1036,7 @@ class _DebugPanelPageState extends ConsumerState<_DebugPanelPage> Center( child: Text( '调试功能仅供开发测试使用', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ], @@ -1067,7 +1067,7 @@ class _DebugPanelPageState extends ConsumerState<_DebugPanelPage> const SizedBox(width: AppSpacing.sm), Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), Icon(CupertinoIcons.chevron_right, color: ext.textHint, size: 14), diff --git a/lib/features/file_transfer/presentation/pages/transfer_stats_page.dart b/lib/features/file_transfer/presentation/pages/transfer_stats_page.dart index 96de0766..57a313ba 100644 --- a/lib/features/file_transfer/presentation/pages/transfer_stats_page.dart +++ b/lib/features/file_transfer/presentation/pages/transfer_stats_page.dart @@ -50,7 +50,7 @@ class _TransferStatsPageState extends ConsumerState { border: null, middle: Text( '传输统计', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ), child: SafeArea( @@ -194,7 +194,7 @@ class _TransferStatsPageState extends ConsumerState { ? Center( child: Text( '暂无数据', - style: AppTypography.of(context).body + style: AppTypography.body .copyWith(color: ext.textSecondary), ), ) @@ -241,7 +241,7 @@ class _TransferStatsPageState extends ConsumerState { padding: const EdgeInsets.only(top: 4), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -371,12 +371,12 @@ class _TransferStatsPageState extends ConsumerState { children: [ Text( name, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), overflow: TextOverflow.ellipsis, ), Text( '$fileCount 个文件 · ${_formatBytes(totalBytes)}', - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textSecondary), ), ], @@ -384,7 +384,7 @@ class _TransferStatsPageState extends ConsumerState { ), Text( _formatSpeed(avgSpeed), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], ), @@ -484,7 +484,7 @@ class _TransferStatsPageState extends ConsumerState { const SizedBox(width: 6), Text( '${item.category} (${item.fileCount})', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -589,12 +589,12 @@ class _TransferStatsPageState extends ConsumerState { Expanded( child: Text( label, - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), ), Text( value, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: color, fontWeight: FontWeight.w600, ), @@ -612,7 +612,7 @@ class _TransferStatsPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( title, - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ); } @@ -639,7 +639,7 @@ class _TransferStatsPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( label, - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textSecondary), ), ], @@ -647,14 +647,14 @@ class _TransferStatsPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontSize: 18, ), ), Text( subtitle, - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textSecondary, fontSize: 11), ), ], diff --git a/lib/features/file_transfer/presentation/widgets/device_card.dart b/lib/features/file_transfer/presentation/widgets/device_card.dart index a244a813..86872d2b 100644 --- a/lib/features/file_transfer/presentation/widgets/device_card.dart +++ b/lib/features/file_transfer/presentation/widgets/device_card.dart @@ -130,7 +130,7 @@ class DeviceCard extends StatelessWidget { Flexible( child: Text( customAlias ?? device.displayAlias, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -158,7 +158,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(height: 2), Text( device.displayInfo, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -176,7 +176,7 @@ class DeviceCard extends StatelessWidget { ), child: Text( '${device.pairingMethod.emoji} ${device.pairingMethod.label}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -194,7 +194,7 @@ class DeviceCard extends StatelessWidget { ), child: Text( device.displayTransport, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -231,7 +231,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(width: 4), Text( '已配对', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.successColor, fontWeight: FontWeight.w600, ), @@ -263,7 +263,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(width: 6), Text( '配对中...', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -305,7 +305,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(width: 4), Text( '配对', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -334,7 +334,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(width: 4), Text( '配对', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textOnAccent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/widgets/offline_banner.dart b/lib/features/file_transfer/presentation/widgets/offline_banner.dart index b8394d6b..822eacd0 100644 --- a/lib/features/file_transfer/presentation/widgets/offline_banner.dart +++ b/lib/features/file_transfer/presentation/widgets/offline_banner.dart @@ -53,7 +53,7 @@ class OfflineBanner extends StatelessWidget { Expanded( child: Text( '无网络连接', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.warningColor, fontWeight: FontWeight.w600, ), @@ -73,7 +73,7 @@ class OfflineBanner extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '以下方式仍可使用:', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Wrap( @@ -93,7 +93,7 @@ class OfflineBanner extends StatelessWidget { ), child: Text( method, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/file_transfer/presentation/widgets/pairing_method_grid.dart b/lib/features/file_transfer/presentation/widgets/pairing_method_grid.dart index fccbada6..702068cb 100644 --- a/lib/features/file_transfer/presentation/widgets/pairing_method_grid.dart +++ b/lib/features/file_transfer/presentation/widgets/pairing_method_grid.dart @@ -51,7 +51,7 @@ class PairingMethodGrid extends StatelessWidget { ), child: Text( '配对方式', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -118,7 +118,7 @@ class PairingMethodGrid extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( method.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/file_transfer/presentation/widgets/receipt_indicator.dart b/lib/features/file_transfer/presentation/widgets/receipt_indicator.dart index bd782f60..3a9074a6 100644 --- a/lib/features/file_transfer/presentation/widgets/receipt_indicator.dart +++ b/lib/features/file_transfer/presentation/widgets/receipt_indicator.dart @@ -34,7 +34,7 @@ class ReceiptIndicator extends StatelessWidget { const SizedBox(width: 2), Text( config.$2, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: status == DeliveryStatus.read ? ext.infoColor : ext.textHint, diff --git a/lib/features/file_transfer/presentation/widgets/recent_messages_section.dart b/lib/features/file_transfer/presentation/widgets/recent_messages_section.dart index b0bdfc47..a4824f94 100644 --- a/lib/features/file_transfer/presentation/widgets/recent_messages_section.dart +++ b/lib/features/file_transfer/presentation/widgets/recent_messages_section.dart @@ -62,7 +62,7 @@ class RecentMessagesSection extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '最近消息', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -75,7 +75,7 @@ class RecentMessagesSection extends StatelessWidget { onTap: onViewAll, child: Text( '查看全部 ›', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ], @@ -131,7 +131,7 @@ class RecentMessagesSection extends StatelessWidget { if (msg.isRemote && msg.deviceAlias != null) ...[ Text( '${msg.deviceEmoji ?? ""} ${msg.deviceAlias}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -152,7 +152,7 @@ class RecentMessagesSection extends StatelessWidget { Expanded( child: Text( _getMessageTitle(msg), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isUnread ? ext.textPrimary : ext.textPrimary, @@ -176,7 +176,7 @@ class RecentMessagesSection extends StatelessWidget { ), Text( _formatTime(msg.timestamp), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -185,7 +185,7 @@ class RecentMessagesSection extends StatelessWidget { const SizedBox(height: 2), Text( _getMessageSubtitle(msg), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), maxLines: 1, diff --git a/lib/features/file_transfer/presentation/widgets/transfer_bubble.dart b/lib/features/file_transfer/presentation/widgets/transfer_bubble.dart index 7fc87ae8..07af2209 100644 --- a/lib/features/file_transfer/presentation/widgets/transfer_bubble.dart +++ b/lib/features/file_transfer/presentation/widgets/transfer_bubble.dart @@ -74,7 +74,7 @@ class TransferBubble extends StatelessWidget { children: [ Text( _formatTime(message.timestamp), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -125,7 +125,7 @@ class TransferBubble extends StatelessWidget { const SizedBox(width: 4), Text( item.statusDisplayText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, fontWeight: FontWeight.w500, ), @@ -210,7 +210,7 @@ class TransferBubble extends StatelessWidget { ), child: Text( message.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: isMine ? ext.textOnAccent : ext.textPrimary, ), ), @@ -272,7 +272,7 @@ class TransferBubble extends StatelessWidget { children: [ Text( message.fileName ?? message.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -282,7 +282,7 @@ class TransferBubble extends StatelessWidget { const SizedBox(height: 2), Text( message.fileSizeText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -305,7 +305,7 @@ class TransferBubble extends StatelessWidget { padding: const EdgeInsets.only(top: AppSpacing.xs), child: Text( '已暂停 ${((message.progress ?? 0) * 100).toStringAsFixed(1)}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, fontWeight: FontWeight.w500, ), @@ -316,7 +316,7 @@ class TransferBubble extends StatelessWidget { padding: const EdgeInsets.only(top: AppSpacing.xs), child: Text( message.errorMessage!, - style: AppTypography.of(context).caption2.copyWith(color: ext.errorColor), + style: AppTypography.caption2.copyWith(color: ext.errorColor), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -430,7 +430,7 @@ class TransferBubble extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: textColor, fontWeight: FontWeight.w600, ), @@ -500,7 +500,7 @@ class TransferBubble extends StatelessWidget { Expanded( child: Text( message.content, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textOnAccent.withValues(alpha: 0.9), fontWeight: FontWeight.w500, ), @@ -510,7 +510,7 @@ class TransferBubble extends StatelessWidget { ), Text( message.fileSizeText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textOnAccent.withValues(alpha: 0.6), ), ), @@ -560,7 +560,7 @@ class TransferBubble extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( message.content, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textOnAccent.withValues(alpha: 0.8), ), maxLines: 1, @@ -585,7 +585,7 @@ class TransferBubble extends StatelessWidget { ), child: Text( message.content, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ), @@ -612,7 +612,7 @@ class TransferBubble extends StatelessWidget { Flexible( child: Text( message.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -645,7 +645,7 @@ class TransferBubble extends StatelessWidget { children: [ Text( message.fileName ?? message.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -673,12 +673,12 @@ class TransferBubble extends StatelessWidget { children: [ Text( message.progressText, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), if (message.fileSizeText.isNotEmpty) Text( message.fileSizeText, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -806,7 +806,7 @@ class TransferBubble extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( durationText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isMine ? ext.textOnAccent.withValues(alpha: 0.8) : ext.textHint, diff --git a/lib/features/file_transfer/presentation/widgets/transfer_progress_bar.dart b/lib/features/file_transfer/presentation/widgets/transfer_progress_bar.dart index 2b9eba97..69004760 100644 --- a/lib/features/file_transfer/presentation/widgets/transfer_progress_bar.dart +++ b/lib/features/file_transfer/presentation/widgets/transfer_progress_bar.dart @@ -47,7 +47,7 @@ class TransferProgressBar extends StatelessWidget { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( label!, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ), ClipRRect( @@ -99,7 +99,7 @@ class TransferProgressBar extends StatelessWidget { if (showPercentage) Text( '${(progress * 100).toStringAsFixed(1)}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -107,7 +107,7 @@ class TransferProgressBar extends StatelessWidget { if (showSpeed && speed != null) Text( speed!, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/file_transfer/presentation/widgets/transfer_speed_chart.dart b/lib/features/file_transfer/presentation/widgets/transfer_speed_chart.dart index cef19987..a619a33e 100644 --- a/lib/features/file_transfer/presentation/widgets/transfer_speed_chart.dart +++ b/lib/features/file_transfer/presentation/widgets/transfer_speed_chart.dart @@ -46,7 +46,7 @@ class TransferSpeedChart extends StatelessWidget { padding: const EdgeInsets.only(right: AppSpacing.sm), child: Text( _formatSpeed(currentSpeed!), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/file_transfer/presentation/widgets/transfer_task_card.dart b/lib/features/file_transfer/presentation/widgets/transfer_task_card.dart index fb05453b..cb3bc857 100644 --- a/lib/features/file_transfer/presentation/widgets/transfer_task_card.dart +++ b/lib/features/file_transfer/presentation/widgets/transfer_task_card.dart @@ -92,7 +92,7 @@ class TransferTaskCard extends StatelessWidget { children: [ Text( task.fileName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -112,23 +112,23 @@ class TransferTaskCard extends StatelessWidget { const SizedBox(width: 4), Text( task.isSend ? '发送' : '接收', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( ' · ', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( task.transport.label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( ' · ', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( task.fileSizeText, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -188,7 +188,7 @@ class TransferTaskCard extends StatelessWidget { ), child: Text( label, - style: AppTypography.of(context).caption2.copyWith(color: textColor), + style: AppTypography.caption2.copyWith(color: textColor), ), ); } @@ -221,12 +221,12 @@ class TransferTaskCard extends StatelessWidget { children: [ Text( '${task.transferredText} / ${task.fileSizeText}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), if (task.isActive) Text( task.speedText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -234,12 +234,12 @@ class TransferTaskCard extends StatelessWidget { if (task.isActive) Text( '剩余 ${task.remainingTimeText}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), if (task.isPaused) Text( '已暂停 ${(task.progressPercent * 100).toStringAsFixed(1)}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, fontWeight: FontWeight.w500, ), @@ -279,7 +279,7 @@ class TransferTaskCard extends StatelessWidget { const SizedBox(width: 4), Text( '分片进度', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), @@ -289,7 +289,7 @@ class TransferTaskCard extends StatelessWidget { const Spacer(), Text( '$receivedCount / $totalChunks', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -302,7 +302,7 @@ class TransferTaskCard extends StatelessWidget { children: [ Text( '缺失 $missing 块', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.warningColor, ), ), @@ -310,7 +310,7 @@ class TransferTaskCard extends StatelessWidget { if (task.isResumable) Text( '可续传', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontWeight: FontWeight.w500, ), @@ -366,7 +366,7 @@ class TransferTaskCard extends StatelessWidget { Expanded( child: Text( task.errorMessage ?? '传输失败', - style: AppTypography.of(context).caption2.copyWith(color: ext.errorColor), + style: AppTypography.caption2.copyWith(color: ext.errorColor), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -470,7 +470,7 @@ class TransferTaskCard extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: textColor), + style: AppTypography.caption2.copyWith(color: textColor), ), ], ), diff --git a/lib/features/file_transfer/presentation/widgets/usb_confirm_dialog.dart b/lib/features/file_transfer/presentation/widgets/usb_confirm_dialog.dart index b0763d89..bb5f6518 100644 --- a/lib/features/file_transfer/presentation/widgets/usb_confirm_dialog.dart +++ b/lib/features/file_transfer/presentation/widgets/usb_confirm_dialog.dart @@ -44,8 +44,8 @@ class UsbConfirmDialog extends StatelessWidget { title: Row( mainAxisSize: MainAxisSize.min, children: [ - Text('🔌 ', style: AppTypography.of(context).title3), - Text('USB设备', style: AppTypography.of(context).title3), + Text('🔌 ', style: AppTypography.title3), + Text('USB设备', style: AppTypography.title3), ], ), content: Padding( @@ -55,7 +55,7 @@ class UsbConfirmDialog extends StatelessWidget { children: [ Text( '检测到USB设备 ${device.deviceName},\n是否开始传输?', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -113,14 +113,14 @@ class UsbConfirmDialog extends StatelessWidget { children: [ Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), Flexible( child: Text( value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), diff --git a/lib/features/file_transfer/presentation/widgets/voice_bubble.dart b/lib/features/file_transfer/presentation/widgets/voice_bubble.dart index 8ecca462..13060332 100644 --- a/lib/features/file_transfer/presentation/widgets/voice_bubble.dart +++ b/lib/features/file_transfer/presentation/widgets/voice_bubble.dart @@ -184,7 +184,7 @@ class _VoiceBubbleState extends State return Text( '$minutes:${secs.toString().padLeft(2, '0')}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: widget.isMine ? ext.textOnAccent.withValues(alpha: 0.8) : ext.textHint, diff --git a/lib/features/file_transfer/presentation/widgets/voice_recording_overlay.dart b/lib/features/file_transfer/presentation/widgets/voice_recording_overlay.dart index 918de8f8..bf0f7445 100644 --- a/lib/features/file_transfer/presentation/widgets/voice_recording_overlay.dart +++ b/lib/features/file_transfer/presentation/widgets/voice_recording_overlay.dart @@ -92,7 +92,7 @@ class _VoiceRecordingOverlayState extends State { const SizedBox(width: AppSpacing.sm), Text( '$minutes:${secs.toString().padLeft(2, '0')}', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: isNearLimit ? ext.errorColor : ext.textPrimary, @@ -102,7 +102,7 @@ class _VoiceRecordingOverlayState extends State { const SizedBox(width: AppSpacing.sm), Text( isNearLimit ? '即将超时' : '/ 1:00', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isNearLimit ? ext.errorColor : ext.textSecondary, @@ -126,7 +126,7 @@ class _VoiceRecordingOverlayState extends State { const SizedBox(height: AppSpacing.xs), Text( '上滑取消录音', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/home/presentation/cache_management_page.dart b/lib/features/home/presentation/cache_management_page.dart index a07cef9e..e312329b 100644 --- a/lib/features/home/presentation/cache_management_page.dart +++ b/lib/features/home/presentation/cache_management_page.dart @@ -64,7 +64,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '缓存管理', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -139,7 +139,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '存储空间', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -168,14 +168,14 @@ class _CacheManagementPageState extends ConsumerState { children: [ Text( totalSize, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( '/ ${maxMB}MB', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -224,7 +224,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '分类统计', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -318,7 +318,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '缓存清理', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -339,7 +339,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '清理过期缓存', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -367,7 +367,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '🧹 清理聊天回收站', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent.withValues(alpha: 0.8), fontWeight: FontWeight.w600, ), @@ -397,7 +397,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '📎 清理聊天缩略图', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent.withValues(alpha: 0.8), fontWeight: FontWeight.w600, ), @@ -425,7 +425,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '清除全部缓存', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -455,7 +455,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '📁 清理传输缓存', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent.withValues(alpha: 0.8), fontWeight: FontWeight.w600, ), @@ -483,7 +483,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '💬 清理全部聊天数据', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed.withValues(alpha: 0.9), fontWeight: FontWeight.w600, ), @@ -513,7 +513,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '📖 清理稍后读缓存', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent.withValues(alpha: 0.8), fontWeight: FontWeight.w600, ), @@ -543,7 +543,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '📖 清理全部稍后读数据', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed.withValues(alpha: 0.9), fontWeight: FontWeight.w600, ), @@ -579,7 +579,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '缓存策略', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -636,14 +636,14 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ); @@ -667,13 +667,13 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ], ), Text( value, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -698,7 +698,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ], ), @@ -713,7 +713,7 @@ class _CacheManagementPageState extends ConsumerState { ), child: Text( value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -982,7 +982,7 @@ class _CacheManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '正在清理缓存...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ], ), diff --git a/lib/features/home/presentation/date_config_sheet.dart b/lib/features/home/presentation/date_config_sheet.dart index c4e4fe9b..5e04a396 100644 --- a/lib/features/home/presentation/date_config_sheet.dart +++ b/lib/features/home/presentation/date_config_sheet.dart @@ -123,7 +123,7 @@ class _DateConfigSheetState extends ConsumerState { children: [ Text( CharacterName.givenName, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -140,7 +140,7 @@ class _DateConfigSheetState extends ConsumerState { ), child: Text( 'Lv.${moodState.level}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -158,7 +158,7 @@ class _DateConfigSheetState extends ConsumerState { ), child: Text( CharacterName.renameHint, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -169,14 +169,14 @@ class _DateConfigSheetState extends ConsumerState { const SizedBox(height: 2), Text( CharacterName.fullName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), const SizedBox(height: 4), Text( CharacterName.introduction, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textHint, height: 1.4, ), @@ -200,7 +200,7 @@ class _DateConfigSheetState extends ConsumerState { const SizedBox(width: 8), Text( '${moodState.exp} EXP', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -322,7 +322,7 @@ class _DateConfigSheetState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '${CharacterName.barFullName}配置', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -336,7 +336,7 @@ class _DateConfigSheetState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( '选择要在${CharacterName.barName}显示的信息(最多3项)', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), const SizedBox(height: AppSpacing.md), @@ -371,10 +371,10 @@ class _DateConfigSheetState extends ConsumerState { child: CupertinoTextField( controller: _customTextController, placeholder: '输入文案', - placeholderStyle: AppTypography.of(context).caption1.copyWith( + placeholderStyle: AppTypography.caption1.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), padding: const EdgeInsets.symmetric( @@ -418,7 +418,7 @@ class _DateConfigSheetState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '长文本轮播', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -440,7 +440,7 @@ class _DateConfigSheetState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( '💡 拾光Tips', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), const SizedBox(height: AppSpacing.xs), @@ -448,7 +448,7 @@ class _DateConfigSheetState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( '点击角色时弹出消息气泡', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -489,7 +489,7 @@ class _DateConfigSheetState extends ConsumerState { const SizedBox(width: 4), Text( cat.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isEnabled ? ext.accent : ext.textSecondary, fontWeight: isEnabled ? FontWeight.w600 @@ -556,13 +556,13 @@ class _ConfigItemRow extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), if (trailing == null) Text( valueText, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/home/presentation/favorite_page.dart b/lib/features/home/presentation/favorite_page.dart index 7ee26a19..093f6bc8 100644 --- a/lib/features/home/presentation/favorite_page.dart +++ b/lib/features/home/presentation/favorite_page.dart @@ -251,7 +251,7 @@ class _FavoritePageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '💕 我的收藏', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.9), border: null, @@ -273,7 +273,7 @@ class _FavoritePageState extends ConsumerState { onPressed: _toggleSelectMode, child: Text( _isSelectMode ? '取消' : '管理', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -323,7 +323,7 @@ class _FavoritePageState extends ConsumerState { : Center( child: Text( '暂无统计', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -348,14 +348,14 @@ class _FavoritePageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -407,7 +407,7 @@ class _FavoritePageState extends ConsumerState { focusNode: _searchFocusNode, onChanged: (v) => setState(() => _searchQuery = v.trim()), placeholder: '搜索收藏内容', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), backgroundColor: ext.bgSecondary, ), ); @@ -459,7 +459,7 @@ class _FavoritePageState extends ConsumerState { const SizedBox(width: 4), Text( _sortLabel, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -511,7 +511,7 @@ class _FavoritePageState extends ConsumerState { children: [ Text( '已选 ${_selectedIds.length} 项', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), CupertinoButton( @@ -520,7 +520,7 @@ class _FavoritePageState extends ConsumerState { onPressed: () => _selectAll(items), child: Text( '全选', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -531,7 +531,7 @@ class _FavoritePageState extends ConsumerState { : () => _deleteSelected(items), child: Text( '取消收藏', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _selectedIds.isEmpty ? ext.textHint : CupertinoColors.systemRed, @@ -639,7 +639,7 @@ class _FavoritePageState extends ConsumerState { ), child: Text( _getTypeLabel(item.targetType), - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), const Spacer(), @@ -672,7 +672,7 @@ class _FavoritePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( _formatTime(item.createtime), - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -680,7 +680,7 @@ class _FavoritePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( item.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -691,7 +691,7 @@ class _FavoritePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( item.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -759,7 +759,7 @@ class _FavoritePageState extends ConsumerState { ), child: Text( _getTypeLabel(item.targetType), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -768,7 +768,7 @@ class _FavoritePageState extends ConsumerState { const Spacer(), Text( _formatTime(item.createtime), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -779,7 +779,7 @@ class _FavoritePageState extends ConsumerState { Expanded( child: Text( item.content.isNotEmpty ? item.content : item.title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.4, ), @@ -825,7 +825,7 @@ class _FavoritePageState extends ConsumerState { Expanded( child: Text( '本地收藏模式 · 登录后可同步到云端', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -834,7 +834,7 @@ class _FavoritePageState extends ConsumerState { onPressed: () => context.appPush(AppRoutes.login), child: Text( '登录同步', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -886,7 +886,7 @@ class _FavoritePageState extends ConsumerState { Expanded( child: Text( message, - style: AppTypography.of(context).caption1.copyWith(color: iconColor), + style: AppTypography.caption1.copyWith(color: iconColor), ), ), if (!isSyncing) @@ -930,7 +930,7 @@ class _FavoritePageState extends ConsumerState { children: [ Text( s.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -941,7 +941,7 @@ class _FavoritePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '—— ${s.author}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -970,12 +970,12 @@ class _FavoritePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( isFiltered ? '没有匹配的收藏' : '还没有收藏', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( isFiltered ? '试试其他关键词' : '在首页点击❤️即可收藏句子', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -1298,7 +1298,7 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { navigationBar: CupertinoNavigationBar( middle: Text( '📁 收藏分组', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.9), border: null, @@ -1307,7 +1307,7 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { onPressed: () => Navigator.pop(context), child: Text( '完成', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), trailing: CupertinoButton( @@ -1320,7 +1320,7 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { const SizedBox(width: 2), Text( '新建', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ], ), @@ -1336,14 +1336,14 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { const SizedBox(height: AppSpacing.md), Text( '暂无分组', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, ), ), const SizedBox(height: AppSpacing.sm), Text( '点击右上角新建分组', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -1405,7 +1405,7 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { Expanded( child: Text( g, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -1422,7 +1422,7 @@ class _GroupManagerSheetState extends ConsumerState<_GroupManagerSheet> { ), child: Text( '$count', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/home/presentation/history_page.dart b/lib/features/home/presentation/history_page.dart index 55cc5736..6acbb84d 100644 --- a/lib/features/home/presentation/history_page.dart +++ b/lib/features/home/presentation/history_page.dart @@ -368,7 +368,7 @@ class _HistoryPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '📖 阅读历史', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.9), border: null, @@ -417,7 +417,7 @@ class _HistoryPageState extends ConsumerState { onPressed: _toggleSelectMode, child: Text( _isSelectMode ? '取消' : '管理', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], @@ -492,14 +492,14 @@ class _HistoryPageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -550,7 +550,7 @@ class _HistoryPageState extends ConsumerState { focusNode: _searchFocusNode, onChanged: _onSearchChanged, placeholder: '搜索句子内容或作者', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), backgroundColor: ext.bgSecondary, ), ); @@ -673,7 +673,7 @@ class _HistoryPageState extends ConsumerState { ), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), @@ -693,7 +693,7 @@ class _HistoryPageState extends ConsumerState { children: [ Text( '已选 ${_selectedIds.length} 项', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), CupertinoButton( @@ -702,7 +702,7 @@ class _HistoryPageState extends ConsumerState { onPressed: _selectAll, child: Text( '全选', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -711,7 +711,7 @@ class _HistoryPageState extends ConsumerState { onPressed: _selectedIds.isEmpty ? null : _deleteSelected, child: Text( '删除', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _selectedIds.isEmpty ? ext.textHint : CupertinoColors.systemRed, @@ -738,12 +738,12 @@ class _HistoryPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( isFiltered ? '没有匹配的记录' : '还没有阅读记录', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( isFiltered ? '试试其他关键词或筛选条件' : '浏览句子时会自动记录', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -767,7 +767,7 @@ class _HistoryPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '离线模式 · 仅显示本地缓存数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemOrange, ), ), @@ -775,7 +775,7 @@ class _HistoryPageState extends ConsumerState { if (_lastSyncTime != null) Text( '上次同步: ${DateFormat('HH:mm').format(_lastSyncTime!)}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemOrange.withValues(alpha: 0.7), ), ), @@ -855,7 +855,7 @@ class _HistoryPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( dateLabel, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -863,7 +863,7 @@ class _HistoryPageState extends ConsumerState { const Spacer(), Text( '$count 条', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -885,7 +885,7 @@ class _HistoryPageState extends ConsumerState { children: [ Text( s.text, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -898,7 +898,7 @@ class _HistoryPageState extends ConsumerState { if (s.author != null) ...[ Text( '—— ${s.author!}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -907,7 +907,7 @@ class _HistoryPageState extends ConsumerState { const Spacer(), Text( timeStr, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/home/presentation/home_daily_card.dart b/lib/features/home/presentation/home_daily_card.dart index 520dd51d..86ff64e2 100644 --- a/lib/features/home/presentation/home_daily_card.dart +++ b/lib/features/home/presentation/home_daily_card.dart @@ -360,7 +360,7 @@ class _DailyCardState extends ConsumerState const SizedBox(width: AppSpacing.xs), Text( '每日推荐', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -377,7 +377,6 @@ class _DailyCardState extends ConsumerState AppBarCharacterSprite( characterId: characterId, expression: CharacterExpression.think, - size: 48, ) .animate(onPlay: (c) => c.repeat()) .scale( @@ -389,7 +388,7 @@ class _DailyCardState extends ConsumerState const SizedBox(height: AppSpacing.sm), Text( '正在为你寻找新句子...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ) @@ -517,7 +516,7 @@ class _DailyCardState extends ConsumerState if (config.cardIndexLabel != null) { return Text( config.cardIndexLabel!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isCustom ? Colors.white.withValues(alpha: 0.5) : ext.textHint, @@ -539,7 +538,7 @@ class _DailyCardState extends ConsumerState const SizedBox(width: AppSpacing.xs), Text( '每日推荐', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isCustom ? Colors.white.withValues(alpha: 0.8) : ext.textSecondary, @@ -551,7 +550,7 @@ class _DailyCardState extends ConsumerState if (sentence.feedName != null) Text( ' ${sentence.feedName}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isCustom ? Colors.white.withValues(alpha: 0.5) : ext.textHint, @@ -573,7 +572,7 @@ class _DailyCardState extends ConsumerState height: 1.5, fontWeight: FontWeight.w500, ) - : AppTypography.of(context).title3.copyWith(color: ext.textPrimary, height: 1.5); + : AppTypography.title3.copyWith(color: ext.textPrimary, height: 1.5); final textWidget = Text( text, @@ -610,10 +609,10 @@ class _DailyCardState extends ConsumerState child: Text( '—— $author', style: isCustom - ? AppTypography.of(context).subhead.copyWith( + ? AppTypography.subhead.copyWith( color: Colors.white.withValues(alpha: 0.7), ) - : AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + : AppTypography.subhead.copyWith(color: ext.textSecondary), overflow: config.authorOverflow, ), ), diff --git a/lib/features/home/presentation/home_page.dart b/lib/features/home/presentation/home_page.dart index ea1752c2..ac9d0f7d 100644 --- a/lib/features/home/presentation/home_page.dart +++ b/lib/features/home/presentation/home_page.dart @@ -303,7 +303,7 @@ class _HomePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '离线模式 — 展示缓存数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -376,7 +376,7 @@ class _HomePageState extends ConsumerState { _characterKey.currentState?.lookAtTitle(), child: Text( CharacterName.appBarTitle, - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, ), ), @@ -475,7 +475,7 @@ class _HomePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '创作卡片', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -507,7 +507,7 @@ class _HomePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '编辑此句', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -583,14 +583,14 @@ class _HomePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无句子', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textSecondary, ), ), const SizedBox(height: AppSpacing.sm), Text( '下拉刷新试试', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -704,7 +704,7 @@ class _HomePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '网络连接失败', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.xs), CupertinoButton( @@ -717,7 +717,7 @@ class _HomePageState extends ConsumerState { onPressed: () => ref.read(homeProvider.notifier).refresh(), child: Text( '点击重试', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), ], @@ -783,7 +783,7 @@ class _HomePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '每日推荐', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -797,7 +797,7 @@ class _HomePageState extends ConsumerState { onPressed: () => ref.read(homeProvider.notifier).refresh(), child: Text( '重试', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ], @@ -810,7 +810,7 @@ class _HomePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '正在获取今日推荐...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/home/presentation/home_refresh_indicator.dart b/lib/features/home/presentation/home_refresh_indicator.dart index 8f53eec4..892390a1 100644 --- a/lib/features/home/presentation/home_refresh_indicator.dart +++ b/lib/features/home/presentation/home_refresh_indicator.dart @@ -202,14 +202,14 @@ class _HomeRefreshIndicatorState extends ConsumerState children: [ Text( isReady ? '松手打开' : '$v%', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: isReady ? ext.accent : ext.textSecondary, fontWeight: FontWeight.w700, ), ), Text( isReady ? '最近打开 ✨' : '继续下拉~', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isReady ? ext.accent : ext.textHint, ), ), diff --git a/lib/features/home/presentation/home_sentence_card.dart b/lib/features/home/presentation/home_sentence_card.dart index 09e47b03..cba06432 100644 --- a/lib/features/home/presentation/home_sentence_card.dart +++ b/lib/features/home/presentation/home_sentence_card.dart @@ -168,14 +168,14 @@ class _SentenceCardState extends ConsumerState { const SizedBox(width: 4), Text( sentence.feedName!, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], if (sentence.views > 0) ...[ const Spacer(), Text( '👁 ${sentence.views}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ], @@ -221,7 +221,7 @@ class _SentenceCardState extends ConsumerState { : displayText; return Text( fallback, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: isEmpty ? ext.textHint : ext.textPrimary, height: 1.6, ), @@ -246,7 +246,7 @@ class _SentenceCardState extends ConsumerState { padding: const EdgeInsets.only(right: AppSpacing.sm), child: Text( '👍 ${_fmtCount(sentence.likeCount)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), if (sentence.favoriteCount > 0) @@ -254,7 +254,7 @@ class _SentenceCardState extends ConsumerState { padding: const EdgeInsets.only(right: AppSpacing.sm), child: Text( '⭐ ${_fmtCount(sentence.favoriteCount)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), if (sentence.commentCount > 0) @@ -262,7 +262,7 @@ class _SentenceCardState extends ConsumerState { padding: const EdgeInsets.only(right: AppSpacing.sm), child: Text( '💬 ${_fmtCount(sentence.commentCount)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ], @@ -278,7 +278,7 @@ class _SentenceCardState extends ConsumerState { Expanded( child: Text( '—— ${sentence.author!}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ) else diff --git a/lib/features/home/presentation/home_square_header.dart b/lib/features/home/presentation/home_square_header.dart index dd26002e..b938c0ac 100644 --- a/lib/features/home/presentation/home_square_header.dart +++ b/lib/features/home/presentation/home_square_header.dart @@ -257,14 +257,14 @@ class _SquareHeaderContentState extends State { children: [ Text( '📖 拖动排序', - style: AppTypography.of(context).title3.copyWith(color: widget.ext.textPrimary), + style: AppTypography.title3.copyWith(color: widget.ext.textPrimary), ), CupertinoButton( padding: const EdgeInsets.symmetric(horizontal: 12), onPressed: _exitReorderMode, child: Text( '完成', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.accent, fontWeight: FontWeight.w600, ), @@ -290,7 +290,7 @@ class _SquareHeaderContentState extends State { children: [ Text( '📖 句子广场', - style: AppTypography.of(context).title3.copyWith(color: widget.ext.textPrimary), + style: AppTypography.title3.copyWith(color: widget.ext.textPrimary), ), Row( mainAxisSize: MainAxisSize.min, @@ -316,7 +316,7 @@ class _SquareHeaderContentState extends State { children: [ Text( '${sortLabel.value.$1} ${sortLabel.value.$2}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.textSecondary, ), ), diff --git a/lib/features/home/presentation/home_tool_center.dart b/lib/features/home/presentation/home_tool_center.dart index e38792db..563ea350 100644 --- a/lib/features/home/presentation/home_tool_center.dart +++ b/lib/features/home/presentation/home_tool_center.dart @@ -9,7 +9,6 @@ import 'dart:ui'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../../core/registry/page_registry.dart'; @@ -265,7 +264,7 @@ class _FloatingPanelState extends ConsumerState<_FloatingPanel> children: [ Text( '🔧 选择自定义工具', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -310,14 +309,14 @@ class _FloatingPanelState extends ConsumerState<_FloatingPanel> const SizedBox(width: AppSpacing.sm), Text( item.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), const Spacer(), Text( item.route, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -387,7 +386,6 @@ class _FloatingPanelState extends ConsumerState<_FloatingPanel> borderRadius: BorderRadius.circular(20), border: Border.all( color: ext.textHint.withValues(alpha: 0.15), - width: 1.0, ), boxShadow: [ BoxShadow( @@ -423,7 +421,7 @@ class _FloatingPanelState extends ConsumerState<_FloatingPanel> children: [ Text( '🕐 最近打开', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const Spacer(), GestureDetector( @@ -444,7 +442,7 @@ class _FloatingPanelState extends ConsumerState<_FloatingPanel> const SizedBox(width: 2), Text( '收起', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -539,7 +537,7 @@ class _RecentToolButton extends StatelessWidget { width: 64, child: Text( name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -587,7 +585,7 @@ class _EmptyToolButton extends StatelessWidget { width: 64, child: Text( '打开任意页面\n自动记录', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, height: 1.2, ), @@ -656,7 +654,7 @@ class _CustomToolButton extends StatelessWidget { width: 64, child: Text( isDefault ? '长按设置' : name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/home/presentation/home_type_chip.dart b/lib/features/home/presentation/home_type_chip.dart index 095229b5..f65780ef 100644 --- a/lib/features/home/presentation/home_type_chip.dart +++ b/lib/features/home/presentation/home_type_chip.dart @@ -194,7 +194,7 @@ class _TypeChipState extends State with TickerProviderStateMixin { const SizedBox(width: 3), Text( widget.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selected ? ext.textOnAccent : ext.textSecondary, fontWeight: selected ? FontWeight.w600 : FontWeight.normal, ), diff --git a/lib/features/home/presentation/nearby_users_sheet.dart b/lib/features/home/presentation/nearby_users_sheet.dart index 390d3cde..3e053184 100644 --- a/lib/features/home/presentation/nearby_users_sheet.dart +++ b/lib/features/home/presentation/nearby_users_sheet.dart @@ -131,7 +131,7 @@ class _NearbyUsersSheetState extends ConsumerState { Expanded( child: Text( '附近的人', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -143,7 +143,7 @@ class _NearbyUsersSheetState extends ConsumerState { const SizedBox(height: 4), Text( '发现附近也在使用闲言的用户', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -164,7 +164,7 @@ class _NearbyUsersSheetState extends ConsumerState { onPressed: _toggleScan, child: Text( _isScanning ? '停止扫描' : '开始扫描', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _isScanning ? ext.textSecondary : CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -193,7 +193,7 @@ class _NearbyUsersSheetState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '正在搜索附近的闲言用户...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -233,12 +233,12 @@ class _NearbyUsersSheetState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(height: 4), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], @@ -266,7 +266,7 @@ class _NearbyUsersSheetState extends ConsumerState { children: [ Text( user.displayName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -277,7 +277,7 @@ class _NearbyUsersSheetState extends ConsumerState { const SizedBox(height: 2), Text( '「${user.currentSentenceContent!}」', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 1, @@ -326,7 +326,7 @@ class _NearbyUsersSheetState extends ConsumerState { const SizedBox(width: 3), Text( user.distanceText, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/home/presentation/providers/likes_page.dart b/lib/features/home/presentation/providers/likes_page.dart index f5bf3c30..aa2b0c39 100644 --- a/lib/features/home/presentation/providers/likes_page.dart +++ b/lib/features/home/presentation/providers/likes_page.dart @@ -155,7 +155,7 @@ class _LikesPageState extends ConsumerState { child: Center( child: Text( '共 ${likesState.total > 0 ? likesState.total : _localLikedCount} 条', - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textHint), ), ), @@ -181,7 +181,7 @@ class _LikesPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '👍 点赞历史', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.9), border: null, @@ -220,7 +220,7 @@ class _LikesPageState extends ConsumerState { Expanded( child: Text( '本地点赞模式 · 登录后可同步到云端', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -229,7 +229,7 @@ class _LikesPageState extends ConsumerState { onPressed: () => context.appPush(AppRoutes.login), child: Text( '登录同步', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -268,7 +268,7 @@ class _LikesPageState extends ConsumerState { children: [ Text( s.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -279,7 +279,7 @@ class _LikesPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '—— ${s.author}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -303,12 +303,12 @@ class _LikesPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '还没有点赞记录', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '点赞过的内容会出现在这里', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -335,7 +335,7 @@ class _LikesPageState extends ConsumerState { const SizedBox(width: 4), Text( item.feedName, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -351,7 +351,7 @@ class _LikesPageState extends ConsumerState { ), Text( item.title.isNotEmpty ? item.title : item.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -362,7 +362,7 @@ class _LikesPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '—— ${item.author}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -377,7 +377,7 @@ class _LikesPageState extends ConsumerState { ), child: Text( item.summary, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 2, overflow: TextOverflow.ellipsis, ), diff --git a/lib/features/home/presentation/providers/offline_page.dart b/lib/features/home/presentation/providers/offline_page.dart index 43e415b8..ab4a5550 100644 --- a/lib/features/home/presentation/providers/offline_page.dart +++ b/lib/features/home/presentation/providers/offline_page.dart @@ -59,7 +59,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 6), Text( '离线模式', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -111,14 +111,14 @@ class _OfflinePageState extends ConsumerState { children: [ Text( statusText, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, ), ), const SizedBox(height: 2), Text( statusDesc, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -152,7 +152,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 6), Text( '立即同步', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -190,7 +190,7 @@ class _OfflinePageState extends ConsumerState { Text( '待同步操作', style: - AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -237,7 +237,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 4), Text( '同步全部', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -267,7 +267,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 4), Text( '清空队列', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -307,7 +307,7 @@ class _OfflinePageState extends ConsumerState { Text( '预加载管理', style: - AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -338,7 +338,7 @@ class _OfflinePageState extends ConsumerState { trailing: Text( config.preloadChannels.map(_channelDisplayName).join('、'), style: - AppTypography.of(context).caption1.copyWith(color: ext.textHint), + AppTypography.caption1.copyWith(color: ext.textHint), overflow: TextOverflow.ellipsis, ), ), @@ -364,7 +364,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 6), Text( '立即预加载', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -401,7 +401,7 @@ class _OfflinePageState extends ConsumerState { Text( '缓存策略', style: - AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -422,7 +422,7 @@ class _OfflinePageState extends ConsumerState { ext: ext, trailing: Text( '${config.maxCacheSizeMB} MB', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textSecondary), ), onTap: () => _showCacheLimitPicker(ext, config), @@ -434,7 +434,7 @@ class _OfflinePageState extends ConsumerState { ext: ext, trailing: Text( '${config.cacheExpiryDays} 天', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textSecondary), ), onTap: () => _showExpiryPicker(ext, config), @@ -446,7 +446,7 @@ class _OfflinePageState extends ConsumerState { ext: ext, trailing: Text( '${config.maxOfflineActions}', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textSecondary), ), ), @@ -457,7 +457,7 @@ class _OfflinePageState extends ConsumerState { ext: ext, trailing: Text( '${config.maxRetryCount}', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textSecondary), ), ), @@ -491,7 +491,7 @@ class _OfflinePageState extends ConsumerState { const SizedBox(width: 4), Text( '$label: $value', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -518,12 +518,12 @@ class _OfflinePageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textPrimary), ), Text( subtitle, - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textHint), ), ], @@ -736,7 +736,7 @@ class _SettingRow extends StatelessWidget { child: Text( title, style: - AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), if (trailing != null) trailing!, diff --git a/lib/features/home/presentation/providers/readlater_page.dart b/lib/features/home/presentation/providers/readlater_page.dart index 1b1ef666..0ebe6f86 100644 --- a/lib/features/home/presentation/providers/readlater_page.dart +++ b/lib/features/home/presentation/providers/readlater_page.dart @@ -97,7 +97,7 @@ class _ReadLaterPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '📖 稍后阅读', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -137,7 +137,7 @@ class _ReadLaterPageState extends ConsumerState { ), child: Text( '共 $_total 篇', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ), @@ -175,12 +175,12 @@ class _ReadLaterPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无稍后阅读', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '在句子卡片上滑动即可添加', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -224,7 +224,7 @@ class _ReadLaterPageState extends ConsumerState { children: [ Text( item.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), maxLines: 3, @@ -236,7 +236,7 @@ class _ReadLaterPageState extends ConsumerState { if (item.author.isNotEmpty) ...[ Text( item.author, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -253,7 +253,7 @@ class _ReadLaterPageState extends ConsumerState { ), child: Text( item.feedName, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: feedColor, ), ), diff --git a/lib/features/home/presentation/providers/sentence_detail_sheet.dart b/lib/features/home/presentation/providers/sentence_detail_sheet.dart index d4ac70a2..3d409fd2 100644 --- a/lib/features/home/presentation/providers/sentence_detail_sheet.dart +++ b/lib/features/home/presentation/providers/sentence_detail_sheet.dart @@ -213,14 +213,14 @@ class _SentenceDetailContentState children: [ Text( sentence.feedName ?? '闲言', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( sentence.source ?? '', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -237,7 +237,7 @@ class _SentenceDetailContentState final views = _detailItem?.views ?? 0; return Text( '👁 ${_fmtCount(views)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ); }, ), @@ -251,7 +251,7 @@ class _SentenceDetailContentState ), child: Text( '👁 ${_fmtCount(sentence.views)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ], @@ -325,7 +325,7 @@ class _SentenceDetailContentState const SizedBox(height: 4), SelectableText( _stripHtmlTags(displayText), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, height: 1.7, ), @@ -340,7 +340,7 @@ class _SentenceDetailContentState alignment: Alignment.centerRight, child: Text( '长按可选择文字', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 9, ), @@ -372,7 +372,7 @@ class _SentenceDetailContentState const SizedBox(width: AppSpacing.xs), Text( '—— ${sentence.author!}', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -395,7 +395,7 @@ class _SentenceDetailContentState Expanded( child: Text( _stripHtmlTags(_detailItem?.summary ?? ''), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ), ], @@ -425,7 +425,7 @@ class _SentenceDetailContentState children: [ Text( '📝 原文内容', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -433,7 +433,7 @@ class _SentenceDetailContentState const SizedBox(height: 4), SelectableText( _stripHtmlTags(content), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -837,7 +837,7 @@ class _StatChip extends StatelessWidget { ), child: Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ); } @@ -933,7 +933,7 @@ class _QuickActionBtnState extends State<_QuickActionBtn> const SizedBox(height: 4), AnimatedDefaultTextStyle( duration: const Duration(milliseconds: 250), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.w500, ), diff --git a/lib/features/home/presentation/providers/sentence_dialogs.dart b/lib/features/home/presentation/providers/sentence_dialogs.dart index aff2eff8..b859fe45 100644 --- a/lib/features/home/presentation/providers/sentence_dialogs.dart +++ b/lib/features/home/presentation/providers/sentence_dialogs.dart @@ -53,7 +53,7 @@ class SentenceDialogs { const SizedBox(height: 8), Text( _ratingLabel(selectedScore), - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textSecondary), ), ], diff --git a/lib/features/home/presentation/widgets/quick_card_sheet.dart b/lib/features/home/presentation/widgets/quick_card_sheet.dart index ef72fed7..c5b18c49 100644 --- a/lib/features/home/presentation/widgets/quick_card_sheet.dart +++ b/lib/features/home/presentation/widgets/quick_card_sheet.dart @@ -297,7 +297,7 @@ class _QuickCardSheetState extends ConsumerState { children: [ Text( '✨ Slight editor mini', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, height: 1.0, ), @@ -364,7 +364,7 @@ class _QuickCardSheetState extends ConsumerState { padding: const EdgeInsets.only(bottom: 8, top: 4), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, letterSpacing: 1, @@ -480,7 +480,7 @@ class _QuickCardSheetState extends ConsumerState { width: 36, child: Text( _state.colorDepth.toStringAsFixed(1), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), @@ -570,7 +570,7 @@ class _QuickCardSheetState extends ConsumerState { children: [ Text( '功能开关', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -648,7 +648,7 @@ class _QuickCardSheetState extends ConsumerState { children: [ Text( '预设样式', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -686,7 +686,7 @@ class _QuickCardSheetState extends ConsumerState { children: [ Text( '🏠 主页卡片样式', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -700,7 +700,7 @@ class _QuickCardSheetState extends ConsumerState { }, child: Text( '重置', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), ], @@ -795,7 +795,7 @@ class _QuickCardSheetState extends ConsumerState { width: 36, child: Text( _homeCardStyle.borderRadius.toStringAsFixed(0), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), @@ -831,7 +831,7 @@ class _QuickCardSheetState extends ConsumerState { width: 36, child: Text( _homeCardStyle.padding.toStringAsFixed(0), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), @@ -867,7 +867,7 @@ class _QuickCardSheetState extends ConsumerState { width: 36, child: Text( _homeCardStyle.fontSize.toStringAsFixed(0), - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), @@ -940,7 +940,7 @@ class _QuickCardSheetState extends ConsumerState { width: 36, child: Text( '${_homeCardStyle.shadowIntensity}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), textAlign: TextAlign.right, ), ), @@ -1284,7 +1284,7 @@ class _InfoCheckbox extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: value ? ext.accentLight : ext.textSecondary, fontWeight: value ? FontWeight.w600 : FontWeight.w400, ), diff --git a/lib/features/home/presentation/widgets/quick_card_widgets.dart b/lib/features/home/presentation/widgets/quick_card_widgets.dart index dfaeced1..6ef34fe0 100644 --- a/lib/features/home/presentation/widgets/quick_card_widgets.dart +++ b/lib/features/home/presentation/widgets/quick_card_widgets.dart @@ -42,7 +42,7 @@ class StyleRow extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), @@ -102,7 +102,7 @@ class SelectChip extends StatelessWidget { ], Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: active ? ext.accentLight : ext.textSecondary, fontWeight: active ? FontWeight.w600 : FontWeight.w400, ), @@ -141,7 +141,7 @@ class ToggleItem extends StatelessWidget { children: [ Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -200,7 +200,7 @@ class ExportFormatToggle extends StatelessWidget { ), child: Text( f.name.toUpperCase(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: active ? ext.accentLight : ext.textSecondary, fontWeight: active ? FontWeight.w700 : FontWeight.w400, ), diff --git a/lib/features/mine/achievement/presentation/achievement_page.dart b/lib/features/mine/achievement/presentation/achievement_page.dart index 5c705f9d..c73d4c68 100644 --- a/lib/features/mine/achievement/presentation/achievement_page.dart +++ b/lib/features/mine/achievement/presentation/achievement_page.dart @@ -334,7 +334,7 @@ class _AchievementPageState extends ConsumerState const SizedBox(width: 6), Text( '打卡记录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -342,7 +342,7 @@ class _AchievementPageState extends ConsumerState if (state.records.isNotEmpty) Text( '共 ${state.records.length} 条', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -387,7 +387,7 @@ class _AchievementPageState extends ConsumerState const SizedBox(height: AppSpacing.lg), Text( '还没有打卡记录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -395,7 +395,7 @@ class _AchievementPageState extends ConsumerState const SizedBox(height: AppSpacing.sm), Text( '选择上方学习类型,开始今日打卡\n坚持学习,记录每一天的进步', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), textAlign: TextAlign.center, @@ -420,7 +420,7 @@ class _AchievementPageState extends ConsumerState const SizedBox(width: 6), Text( '立即打卡', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -631,7 +631,7 @@ class _ProfileSummary extends StatelessWidget { const SizedBox(height: 2), Text( '${(progress * 100).toInt()}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -648,7 +648,7 @@ class _ProfileSummary extends StatelessWidget { children: [ Text( data?.currentTitle?.name ?? '初学者', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -656,7 +656,7 @@ class _ProfileSummary extends StatelessWidget { const SizedBox(height: 2), Text( '当前头衔', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -673,7 +673,7 @@ class _ProfileSummary extends StatelessWidget { const SizedBox(height: 2), Text( '$achieved / $total 成就已达成', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -714,7 +714,7 @@ class _ProfileSummary extends StatelessWidget { const SizedBox(width: 4), Text( getLevelBadge(level), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: getLevelColor(level), fontWeight: FontWeight.w700, ), @@ -741,7 +741,7 @@ class _ProfileSummary extends StatelessWidget { const SizedBox(height: 2), Text( '$exp / $expToNext EXP', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -808,14 +808,14 @@ class _StatItem extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -846,7 +846,7 @@ class _TitleProgress extends StatelessWidget { children: [ Text( '🎖️ 头衔进度', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.md), SingleChildScrollView( @@ -891,7 +891,7 @@ class _TitleProgress extends StatelessWidget { const SizedBox(width: 4), Text( title.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isCurrent ? ext.accent : isLocked @@ -906,7 +906,7 @@ class _TitleProgress extends StatelessWidget { const SizedBox(width: 4), Text( '${title.minScore}分', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -958,7 +958,7 @@ class _AchievementSection extends StatelessWidget { ), child: Text( title, - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ), ...achievements.asMap().entries.map((entry) { @@ -1074,7 +1074,7 @@ class _AchievementCard extends StatelessWidget { Expanded( child: Text( achievement.name, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1092,7 +1092,7 @@ class _AchievementCard extends StatelessWidget { ), child: Text( '+${achievement.reward}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -1103,7 +1103,7 @@ class _AchievementCard extends StatelessWidget { const SizedBox(height: 2), Text( achievement.description, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -1121,7 +1121,7 @@ class _AchievementCard extends StatelessWidget { const SizedBox(height: 2), Text( '${achievement.currentValue}/${achievement.conditionValue}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -1144,7 +1144,7 @@ class _AchievementCard extends StatelessWidget { onPressed: () => onClaim?.call(achievement.id), child: Text( '领取', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.white, ), ), @@ -1164,7 +1164,7 @@ class _AchievementCard extends StatelessWidget { ), child: Text( '已领取 ✓', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ), @@ -1257,7 +1257,7 @@ class _CheckinHeader extends StatelessWidget { children: [ Text( hasTodayCheckin ? '今日已打卡' : '今日尚未打卡', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: hasTodayCheckin ? ext.accent : ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -1267,7 +1267,7 @@ class _CheckinHeader extends StatelessWidget { hasTodayCheckin ? '已完成 ${todayRecords.length} 项学习' : '选择类型开始今日学习', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -1349,14 +1349,14 @@ class _HeaderStat extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -1393,7 +1393,7 @@ class _CheckinTypeGrid extends StatelessWidget { const SizedBox(width: 6), Text( '选择学习内容', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const Spacer(), if (isChecking) const CupertinoActivityIndicator(), @@ -1527,7 +1527,7 @@ class _CheckinTypeCardState extends State<_CheckinTypeCard> const SizedBox(height: 6), Text( widget.type.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1535,7 +1535,7 @@ class _CheckinTypeCardState extends State<_CheckinTypeCard> const SizedBox(height: 2), Text( widget.type.description, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: widget.ext.textHint, ), maxLines: 1, @@ -1602,7 +1602,7 @@ class _CheckinSuccessBanner extends StatelessWidget { children: [ Text( comboCount > 1 ? '连击 ×$comboCount!打卡成功' : '打卡成功', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -1610,7 +1610,7 @@ class _CheckinSuccessBanner extends StatelessWidget { const SizedBox(height: 2), Text( '获得 $reward 积分${comboCount > 1 ? ' · 连击加成' : ''}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -1634,7 +1634,7 @@ class _CheckinSuccessBanner extends StatelessWidget { ), child: Text( '×$comboCount', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.bold, ), @@ -1718,7 +1718,7 @@ class _CheckinRecordCard extends StatelessWidget { record.typeName.isNotEmpty ? record.typeName : record.type, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1728,7 +1728,7 @@ class _CheckinRecordCard extends StatelessWidget { padding: const EdgeInsets.only(top: 2), child: Text( record.content, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), maxLines: 1, @@ -1738,7 +1738,7 @@ class _CheckinRecordCard extends StatelessWidget { const SizedBox(height: 2), Text( _formatDate(record.createdAt), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -1756,7 +1756,7 @@ class _CheckinRecordCard extends StatelessWidget { ), child: Text( '+${record.reward}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.bold, ), diff --git a/lib/features/mine/achievement/presentation/badge_wall_page.dart b/lib/features/mine/achievement/presentation/badge_wall_page.dart index d3e64d3c..0ae2884f 100644 --- a/lib/features/mine/achievement/presentation/badge_wall_page.dart +++ b/lib/features/mine/achievement/presentation/badge_wall_page.dart @@ -246,13 +246,13 @@ class _BadgeStatsHeader extends StatelessWidget { children: [ Text( '解锁进度', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), Text( '${(unlockProgress * 100).toInt()}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -300,14 +300,14 @@ class _StatChip extends StatelessWidget { children: [ Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: color, fontWeight: FontWeight.bold, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color.withValues(alpha: 0.7), ), ), @@ -345,7 +345,7 @@ class _BadgeGrid extends StatelessWidget { padding: const EdgeInsets.all(AppSpacing.xl), child: Text( '暂无勋章数据', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ), ); @@ -456,7 +456,7 @@ class _BadgeCard extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( badge.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: badge.isUnlocked ? ext.textPrimary : ext.textHint, fontWeight: FontWeight.w600, ), @@ -477,7 +477,7 @@ class _BadgeCard extends StatelessWidget { ), child: Text( BadgeRarityColors.getLabel(badge.rarity), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: rarityColor, fontWeight: FontWeight.w600, fontSize: 10, @@ -487,7 +487,7 @@ class _BadgeCard extends StatelessWidget { else Text( badge.condition.isNotEmpty ? badge.condition : badge.description, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -542,7 +542,7 @@ class _DisplaySlotSection extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '展示位', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -552,7 +552,7 @@ class _DisplaySlotSection extends StatelessWidget { else Text( '${displayBadgeIds.length}/${stats.maxDisplay}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -577,7 +577,7 @@ class _DisplaySlotSection extends StatelessWidget { Center( child: Text( '点击已解锁勋章可设为展示/取消展示', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -673,7 +673,7 @@ class _DisplaySlot extends StatelessWidget { const SizedBox(height: 4), Text( badge.name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), @@ -721,7 +721,7 @@ class _EmptySlot extends StatelessWidget { const SizedBox(height: 4), Text( '空位', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/mine/achievement/presentation/checkin_page.dart b/lib/features/mine/achievement/presentation/checkin_page.dart index 322dd815..71061cea 100644 --- a/lib/features/mine/achievement/presentation/checkin_page.dart +++ b/lib/features/mine/achievement/presentation/checkin_page.dart @@ -175,7 +175,7 @@ class _CheckinPageState extends ConsumerState const SizedBox(width: 6), Text( '打卡记录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -183,7 +183,7 @@ class _CheckinPageState extends ConsumerState if (state.records.isNotEmpty) Text( '共 ${state.records.length} 条', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -232,7 +232,7 @@ class _CheckinPageState extends ConsumerState const SizedBox(height: AppSpacing.lg), Text( '还没有打卡记录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -240,7 +240,7 @@ class _CheckinPageState extends ConsumerState const SizedBox(height: AppSpacing.sm), Text( '选择上方学习类型,开始今日打卡\n坚持学习,记录每一天的进步', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), textAlign: TextAlign.center, @@ -265,7 +265,7 @@ class _CheckinPageState extends ConsumerState const SizedBox(width: 6), Text( '立即打卡', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith( color: CupertinoColors.white, @@ -485,7 +485,7 @@ class _CheckinHeader extends StatelessWidget { children: [ Text( hasTodayCheckin ? '今日已打卡' : '今日尚未打卡', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: hasTodayCheckin ? ext.accent : ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -495,7 +495,7 @@ class _CheckinHeader extends StatelessWidget { hasTodayCheckin ? '已完成 ${todayRecords.length} 项学习' : '选择类型开始今日学习', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -577,14 +577,14 @@ class _HeaderStat extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -621,7 +621,7 @@ class _CheckinTypeGrid extends StatelessWidget { const SizedBox(width: 6), Text( '选择学习内容', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const Spacer(), if (isChecking) const CupertinoActivityIndicator(), @@ -755,7 +755,7 @@ class _CheckinTypeCardState extends State<_CheckinTypeCard> const SizedBox(height: 6), Text( widget.type.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -763,7 +763,7 @@ class _CheckinTypeCardState extends State<_CheckinTypeCard> const SizedBox(height: 2), Text( widget.type.description, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: widget.ext.textHint, ), maxLines: 1, @@ -830,7 +830,7 @@ class _CheckinSuccessBanner extends StatelessWidget { children: [ Text( comboCount > 1 ? '连击 ×$comboCount!打卡成功' : '打卡成功', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -838,7 +838,7 @@ class _CheckinSuccessBanner extends StatelessWidget { const SizedBox(height: 2), Text( '获得 $reward 积分${comboCount > 1 ? ' · 连击加成' : ''}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -862,7 +862,7 @@ class _CheckinSuccessBanner extends StatelessWidget { ), child: Text( '×$comboCount', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.bold, ), @@ -946,7 +946,7 @@ class _CheckinRecordCard extends StatelessWidget { record.typeName.isNotEmpty ? record.typeName : record.type, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -956,7 +956,7 @@ class _CheckinRecordCard extends StatelessWidget { padding: const EdgeInsets.only(top: 2), child: Text( record.content, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), maxLines: 1, @@ -966,7 +966,7 @@ class _CheckinRecordCard extends StatelessWidget { const SizedBox(height: 2), Text( _formatDate(record.createdAt), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -984,7 +984,7 @@ class _CheckinRecordCard extends StatelessWidget { ), child: Text( '+${record.reward}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.bold, ), diff --git a/lib/features/mine/member/presentation/member_page.dart b/lib/features/mine/member/presentation/member_page.dart index f609642f..dd57b86b 100644 --- a/lib/features/mine/member/presentation/member_page.dart +++ b/lib/features/mine/member/presentation/member_page.dart @@ -116,7 +116,7 @@ class MemberPage extends StatelessWidget { children: [ Text( '👑 会员', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, ), ), @@ -155,7 +155,7 @@ class MemberPage extends StatelessWidget { ), child: Text( '会员权益', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -179,7 +179,7 @@ class MemberPage extends StatelessWidget { ), child: Text( '选择方案', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -256,7 +256,7 @@ class _MemberHeader extends StatelessWidget { children: [ Text( '闲言会员', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -264,7 +264,7 @@ class _MemberHeader extends StatelessWidget { const SizedBox(height: 2), Text( '解锁全部权益,畅享阅读体验', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -305,14 +305,14 @@ class _PrivilegeGrid extends StatelessWidget { children: [ Text( p.title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( p.description, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -351,7 +351,7 @@ class _PlanCard extends StatelessWidget { Expanded( child: Text( plan.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -369,7 +369,7 @@ class _PlanCard extends StatelessWidget { ), child: Text( '推荐', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -384,14 +384,14 @@ class _PlanCard extends StatelessWidget { children: [ Text( plan.price, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), ), Text( plan.period, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -413,7 +413,7 @@ class _PlanCard extends StatelessWidget { const SizedBox(width: 2), Text( f, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -493,7 +493,7 @@ class _FAQSection extends StatelessWidget { ), child: Text( '❓ 常见问题', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -516,7 +516,7 @@ class _FAQSection extends StatelessWidget { children: [ Text( faq.$1, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -524,7 +524,7 @@ class _FAQSection extends StatelessWidget { const SizedBox(height: 2), Text( faq.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/mine/profile/presentation/about_page.dart b/lib/features/mine/profile/presentation/about_page.dart index e5af80d6..5635612b 100644 --- a/lib/features/mine/profile/presentation/about_page.dart +++ b/lib/features/mine/profile/presentation/about_page.dart @@ -35,7 +35,7 @@ class AboutPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( '关于', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -131,7 +131,7 @@ class _AppHeader extends StatelessWidget { children: [ Text( AppConstants.appName, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( fontWeight: FontWeight.bold, color: CupertinoColors.white, ), @@ -139,7 +139,7 @@ class _AppHeader extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( AppConstants.appSlogan, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white.withValues(alpha: 0.85), ), ), @@ -209,7 +209,7 @@ class _VersionBadge extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( 'Version $version', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w500, color: CupertinoColors.white.withValues(alpha: 0.95), ), @@ -536,12 +536,12 @@ class _Footer extends StatelessWidget { children: [ Text( '© 2026 ${AppConstants.appName}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.xs), Text( AppConstants.appSlogan, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ); @@ -586,7 +586,7 @@ class _SectionCard extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, color: ext.textHint, ), @@ -652,7 +652,7 @@ class _ActionTile extends StatelessWidget { children: [ Text( title, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w500, color: isComingSoon ? ext.textSecondary @@ -672,7 +672,7 @@ class _ActionTile extends StatelessWidget { ), child: Text( '待开发', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w500, ), @@ -684,7 +684,7 @@ class _ActionTile extends StatelessWidget { const SizedBox(height: 2), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -764,7 +764,7 @@ class _EmailSheet extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '联系邮箱', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( fontWeight: FontWeight.w700, color: ext.textPrimary, ), @@ -846,7 +846,7 @@ class _EmailTile extends StatelessWidget { children: [ Text( email.address, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -854,7 +854,7 @@ class _EmailTile extends StatelessWidget { const SizedBox(height: 2), Text( email.label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/mine/profile/presentation/profile_page.dart b/lib/features/mine/profile/presentation/profile_page.dart index 6e8a2adf..c59e4891 100644 --- a/lib/features/mine/profile/presentation/profile_page.dart +++ b/lib/features/mine/profile/presentation/profile_page.dart @@ -63,7 +63,7 @@ class _ProfilePageState extends ConsumerState { builder: (ctx) => CupertinoActionSheet( title: Text( t.quickActions, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( @@ -74,7 +74,7 @@ class _ProfilePageState extends ConsumerState { builder: (menuCtx) => CupertinoActionSheet( title: Text( '选择扫码方式', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -211,7 +211,7 @@ class _ProfilePageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( t.navProfile, - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, ), ), @@ -368,7 +368,7 @@ class _ProfilePageState extends ConsumerState { ext: ext, trailing: Text( AppLocale.fromId(settings.languageId).nativeName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -565,7 +565,7 @@ class _ProfileHeader extends ConsumerWidget { : (isLoggedIn && user != null ? user.displayName : t.tapToLogin), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -577,7 +577,7 @@ class _ProfileHeader extends ConsumerWidget { : (isLoggedIn && user != null ? (user.title?.name ?? t.defaultUserName) : t.appSlogan), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -596,7 +596,7 @@ class _ProfileHeader extends ConsumerWidget { ), child: Text( user?.title?.name ?? t.freeTier, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -725,14 +725,14 @@ class _UserStatsBarState extends ConsumerState<_UserStatsBar> { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), textAlign: TextAlign.center, ), ], @@ -819,7 +819,7 @@ class _SettingRow extends StatelessWidget { Expanded( child: Text( title, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), if (trailing != null) trailing!, diff --git a/lib/features/mine/settings/presentation/account/account_deletion_page.dart b/lib/features/mine/settings/presentation/account/account_deletion_page.dart index 3e90eac8..b7555907 100644 --- a/lib/features/mine/settings/presentation/account/account_deletion_page.dart +++ b/lib/features/mine/settings/presentation/account/account_deletion_page.dart @@ -257,7 +257,7 @@ class _AccountDeletionPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '🗑️ 注销账号', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -305,7 +305,7 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '危险操作区域', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -316,7 +316,7 @@ class _AccountDeletionPageState extends ConsumerState { Text( '账号注销后,所有数据将被永久删除且无法恢复。' '提交申请后进入3天审核期,期间可随时取消。', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -344,7 +344,7 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '注销申请状态', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -376,7 +376,7 @@ class _AccountDeletionPageState extends ConsumerState { Expanded( child: Text( _countdownText, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemOrange, fontWeight: FontWeight.w500, ), @@ -398,7 +398,7 @@ class _AccountDeletionPageState extends ConsumerState { onPressed: _cancelDeletion, child: Text( '🔄 取消注销申请', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.activeBlue, fontWeight: FontWeight.w600, ), @@ -429,7 +429,7 @@ class _AccountDeletionPageState extends ConsumerState { ), child: Text( statusText, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: badgeColor, fontWeight: FontWeight.w600, ), @@ -447,13 +447,13 @@ class _AccountDeletionPageState extends ConsumerState { width: 100, child: Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), Expanded( child: Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -485,7 +485,7 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '历史注销记录', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -529,7 +529,7 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '申请注销账号', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -539,12 +539,12 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '当前没有待审核的注销申请。如果您确认要注销账号,请点击下方按钮提交申请。', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), Text( '📌 注销流程说明:', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -566,7 +566,7 @@ class _AccountDeletionPageState extends ConsumerState { onPressed: _requestDeletion, child: Text( '⚠️ 申请注销账号', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -587,7 +587,7 @@ class _AccountDeletionPageState extends ConsumerState { Expanded( child: Text( text, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: AppTheme.ext(context).textSecondary, ), ), @@ -609,7 +609,7 @@ class _AccountDeletionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '注意事项', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -637,7 +637,7 @@ class _AccountDeletionPageState extends ConsumerState { children: [ Text( '•', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: AppTheme.ext(context).textSecondary, ), ), @@ -645,7 +645,7 @@ class _AccountDeletionPageState extends ConsumerState { Expanded( child: Text( text, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: AppTheme.ext(context).textSecondary, ), ), diff --git a/lib/features/mine/settings/presentation/account/account_settings_page.dart b/lib/features/mine/settings/presentation/account/account_settings_page.dart index 6d69cde6..a2aa301a 100644 --- a/lib/features/mine/settings/presentation/account/account_settings_page.dart +++ b/lib/features/mine/settings/presentation/account/account_settings_page.dart @@ -51,7 +51,7 @@ class AccountSettingsPage extends ConsumerWidget { const SizedBox(width: 6), Text( '账户设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -105,7 +105,7 @@ class AccountSettingsPage extends ConsumerWidget { const SizedBox(width: 4), Text( user?.email ?? '未绑定', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -129,7 +129,7 @@ class AccountSettingsPage extends ConsumerWidget { const SizedBox(width: 4), Text( user?.mobile ?? '未绑定', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -156,7 +156,7 @@ class AccountSettingsPage extends ConsumerWidget { const SizedBox(width: 4), Text( user?.hasSecQuestion ?? false ? '已设置' : '未设置', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -251,7 +251,7 @@ class _AvatarSection extends StatelessWidget { children: [ Text( user?.displayName ?? '未设置昵称', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -259,7 +259,7 @@ class _AvatarSection extends StatelessWidget { const SizedBox(height: 2), Text( (user?.bio.isNotEmpty ?? false) ? user!.bio : '点击编辑个人资料', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -289,12 +289,12 @@ class _InfoRow extends StatelessWidget { children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), Text( value, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(width: 4), Icon(CupertinoIcons.chevron_right, size: 14, color: ext.textHint), @@ -336,7 +336,7 @@ class _ActionRow extends StatelessWidget { Expanded( child: Text( title, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: titleColor ?? ext.textPrimary, ), ), @@ -415,7 +415,7 @@ class _LogoutButton extends ConsumerWidget { const SizedBox(width: 6), Text( '退出登录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -646,7 +646,7 @@ Widget _buildVerifyBadge(AppThemeExtension ext, bool verified) { const SizedBox(width: 2), Text( verified ? '已验证' : '未验证', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: verified ? CupertinoColors.systemGreen : CupertinoColors.systemOrange, @@ -815,7 +815,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { const SizedBox(width: AppSpacing.sm), Text( '安全与Token管理', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -829,7 +829,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { onPressed: () => Navigator.pop(context), child: Text( '完成', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -891,7 +891,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { Expanded( child: Text( 'Token状态: $statusText', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), ], @@ -905,7 +905,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { Expanded( child: Text( _tokenPreview!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: 'monospace', ), @@ -924,7 +924,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { child: Text( '过期时间: ${_tokenExpiry?.year ?? 0}-${(_tokenExpiry?.month ?? 1).toString().padLeft(2, '0')}-${(_tokenExpiry?.day ?? 1).toString().padLeft(2, '0')} ' '${(_tokenExpiry?.hour ?? 0).toString().padLeft(2, '0')}:${(_tokenExpiry?.minute ?? 0).toString().padLeft(2, '0')}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -1025,11 +1025,11 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { children: [ Text( title, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), Text( subtitle, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -1066,7 +1066,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { const SizedBox(width: AppSpacing.xs), Text( '安全须知', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemOrange, fontWeight: FontWeight.w600, ), @@ -1079,7 +1079,7 @@ class _SecuritySheetState extends ConsumerState<_SecuritySheet> { '• Token过期后需重新登录获取新Token\n' '• 请勿将Token分享给他人,Token等同于登录凭证\n' '• 建议定期修改密码以确保账户安全', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.6, ), diff --git a/lib/features/mine/settings/presentation/account/change_password_page.dart b/lib/features/mine/settings/presentation/account/change_password_page.dart index e3ca3c50..2c0714aa 100644 --- a/lib/features/mine/settings/presentation/account/change_password_page.dart +++ b/lib/features/mine/settings/presentation/account/change_password_page.dart @@ -152,7 +152,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(width: 6), Text( '修改密码', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -204,7 +204,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(width: 6), Text( '身份验证', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -213,7 +213,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '请选择一种验证方式', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), SizedBox( @@ -239,7 +239,7 @@ class _ChangePasswordPageState extends ConsumerState { ), child: Text( opt['label'] as String, - style: AppTypography.of(context).caption1, + style: AppTypography.caption1, ), ), }, @@ -276,7 +276,7 @@ class _ChangePasswordPageState extends ConsumerState { Expanded( child: Text( '验证邮箱:$_maskedEmail', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), ], @@ -293,10 +293,10 @@ class _ChangePasswordPageState extends ConsumerState { child: CupertinoTextField( controller: _emailCodeController, placeholder: '输入邮箱验证码', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), keyboardType: TextInputType.number, decoration: null, padding: const EdgeInsets.symmetric( @@ -329,7 +329,7 @@ class _ChangePasswordPageState extends ConsumerState { ) : Text( _countdown > 0 ? '${_countdown}s' : '发送验证码', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -350,7 +350,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(width: 4), Text( '邮箱验证成功', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -370,7 +370,7 @@ class _ChangePasswordPageState extends ConsumerState { Expanded( child: Text( '验证码将发送至您的绑定邮箱,60秒内有效', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ], @@ -392,7 +392,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(width: 6), Text( '设置新密码', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -430,7 +430,7 @@ class _ChangePasswordPageState extends ConsumerState { const SizedBox(width: 6), Text( '密码要求', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -457,7 +457,7 @@ class _ChangePasswordPageState extends ConsumerState { ? const CupertinoActivityIndicator(color: CupertinoColors.white) : Text( '确认修改', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -484,10 +484,10 @@ class _ChangePasswordPageState extends ConsumerState { child: CupertinoTextField( controller: controller, placeholder: placeholder, - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), obscureText: obscure, decoration: null, padding: const EdgeInsets.symmetric( @@ -518,12 +518,12 @@ class _ChangePasswordPageState extends ConsumerState { children: [ Text( '•', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.xs), Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/mine/settings/presentation/account/security_question_page.dart b/lib/features/mine/settings/presentation/account/security_question_page.dart index 25a1247f..4fb5c775 100644 --- a/lib/features/mine/settings/presentation/account/security_question_page.dart +++ b/lib/features/mine/settings/presentation/account/security_question_page.dart @@ -179,7 +179,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(width: 6), Text( '密保问题', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -228,7 +228,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( hasSec ? '密保已设置' : '密保未设置', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -239,7 +239,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '当前密保问题:$_currentQuestionText', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], const SizedBox(height: AppSpacing.sm), @@ -247,7 +247,7 @@ class _SecurityQuestionPageState extends ConsumerState { hasSec ? '修改密保需验证身份,支持密码、原密保答案或邮箱验证' : '设置密保问题可增强账号安全,用于找回密码和身份验证', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ], ), @@ -288,7 +288,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(width: 6), Text( '身份验证', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -298,7 +298,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '请选择一种验证方式', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), SizedBox( @@ -324,7 +324,7 @@ class _SecurityQuestionPageState extends ConsumerState { ), child: Text( opt['label'] as String, - style: AppTypography.of(context).caption1, + style: AppTypography.caption1, ), ), }, @@ -343,10 +343,10 @@ class _SecurityQuestionPageState extends ConsumerState { child: CupertinoTextField( controller: _verifyController, placeholder: _verifyMethod == 'password' ? '输入当前密码' : '输入当前密保答案', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), obscureText: _verifyMethod == 'password', decoration: null, padding: const EdgeInsets.symmetric( @@ -372,7 +372,7 @@ class _SecurityQuestionPageState extends ConsumerState { Expanded( child: Text( '验证邮箱:$_maskedEmail', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), ], @@ -389,10 +389,10 @@ class _SecurityQuestionPageState extends ConsumerState { child: CupertinoTextField( controller: _emailCodeController, placeholder: '输入邮箱验证码', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), keyboardType: TextInputType.number, decoration: null, padding: const EdgeInsets.symmetric( @@ -425,7 +425,7 @@ class _SecurityQuestionPageState extends ConsumerState { ) : Text( _countdown > 0 ? '${_countdown}s' : '发送验证码', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -446,7 +446,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(width: 4), Text( '邮箱验证成功', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -466,7 +466,7 @@ class _SecurityQuestionPageState extends ConsumerState { Expanded( child: Text( '验证码将发送至您的绑定邮箱,60秒内有效', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ), ], @@ -488,7 +488,7 @@ class _SecurityQuestionPageState extends ConsumerState { const SizedBox(width: 6), Text( '新密保问题', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -517,7 +517,7 @@ class _SecurityQuestionPageState extends ConsumerState { _selectedQuestionText.isNotEmpty ? _selectedQuestionText : '选择密保问题', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _selectedQuestionText.isNotEmpty ? ext.textPrimary : ext.textHint, @@ -537,8 +537,8 @@ class _SecurityQuestionPageState extends ConsumerState { child: CupertinoTextField( controller: _answerController, placeholder: '输入密保答案(1-50位)', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: null, padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, @@ -563,7 +563,7 @@ class _SecurityQuestionPageState extends ConsumerState { ? const CupertinoActivityIndicator(color: CupertinoColors.white) : Text( _hasSecQuestion ? '确认修改' : '确认设置', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -586,7 +586,7 @@ class _SecurityQuestionPageState extends ConsumerState { CupertinoButton( child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -594,7 +594,7 @@ class _SecurityQuestionPageState extends ConsumerState { ), Text( '选择密保问题', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -602,7 +602,7 @@ class _SecurityQuestionPageState extends ConsumerState { CupertinoButton( child: Text( '确定', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -633,7 +633,7 @@ class _SecurityQuestionPageState extends ConsumerState { return Center( child: Text( q.question, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/mine/settings/presentation/data_management_page.dart b/lib/features/mine/settings/presentation/data_management_page.dart index d921865f..a7562bf3 100644 --- a/lib/features/mine/settings/presentation/data_management_page.dart +++ b/lib/features/mine/settings/presentation/data_management_page.dart @@ -124,7 +124,7 @@ class _DataManagementPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '💾 数据管理', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -173,7 +173,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '存储概览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -181,7 +181,7 @@ class _DataManagementPageState extends ConsumerState { const Spacer(), Text( '共 $_totalLocalItems 条本地数据', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -243,7 +243,7 @@ class _DataManagementPageState extends ConsumerState { color: color, radius: 28, title: '$label\n$count', - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, fontSize: 9, @@ -266,7 +266,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '数据分布', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -305,7 +305,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: 4), Text( '${d.$1} ${d.$2}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -341,7 +341,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '自动备份', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -365,13 +365,13 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: 4), Text( '上次备份: $lastBackupText', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const Spacer(), if (_backups.isNotEmpty) Text( '${_backups.length}个备份 · ${BackupService.formatSize(_totalBackupSize)}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -401,7 +401,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: 4), Text( '立即备份', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -431,7 +431,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: 4), Text( '管理备份', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -483,7 +483,7 @@ class _DataManagementPageState extends ConsumerState { child: Text( label, textAlign: TextAlign.center, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? ext.accent : ext.textHint, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), @@ -538,7 +538,7 @@ class _DataManagementPageState extends ConsumerState { children: [ Text( '备份记录', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: AppTheme.ext(ctx).textPrimary, ), ), @@ -552,7 +552,7 @@ class _DataManagementPageState extends ConsumerState { }, child: Text( '清除全部', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemRed, ), ), @@ -575,7 +575,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '暂无备份记录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: AppTheme.ext(ctx).textSecondary, ), ), @@ -667,13 +667,13 @@ class _DataManagementPageState extends ConsumerState { children: [ Text( backup.formattedDate, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), Text( backup.formattedSize, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -916,7 +916,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '数据分类', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -998,13 +998,13 @@ class _DataManagementPageState extends ConsumerState { children: [ Text( '导出所有数据', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), Text( '收藏+历史+笔记+设置 → 加密文件', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -1045,13 +1045,13 @@ class _DataManagementPageState extends ConsumerState { children: [ Text( '导入数据', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), Text( '从加密文件恢复数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -1088,7 +1088,7 @@ class _DataManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '危险区域', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -1126,7 +1126,7 @@ class _DataManagementPageState extends ConsumerState { }, child: Text( '🗑️ 清除所有本地数据', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -1433,14 +1433,14 @@ class _OverviewItem extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -1471,11 +1471,11 @@ class _CategoryRow extends StatelessWidget { children: [ Text( category.label, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), Text( category.description, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -1489,7 +1489,7 @@ class _CategoryRow extends StatelessWidget { ), child: Text( '${category.count}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/settings/presentation/font/font_comparison_page.dart b/lib/features/mine/settings/presentation/font/font_comparison_page.dart index 50bb2a73..43e84dfb 100644 --- a/lib/features/mine/settings/presentation/font/font_comparison_page.dart +++ b/lib/features/mine/settings/presentation/font/font_comparison_page.dart @@ -53,7 +53,7 @@ class _FontComparisonPageState extends State { navigationBar: CupertinoNavigationBar( middle: Text( '字体对比', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -118,7 +118,7 @@ class _FontComparisonPageState extends State { const SizedBox(width: AppSpacing.xs), Text( '字号', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(width: AppSpacing.sm), Expanded( @@ -133,7 +133,7 @@ class _FontComparisonPageState extends State { ), Text( _fontSize.round().toString(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -150,10 +150,10 @@ class _FontComparisonPageState extends State { child: CupertinoTextField( controller: _previewController, placeholder: '输入自定义预览文本', - placeholderStyle: AppTypography.of(context).caption1.copyWith( + placeholderStyle: AppTypography.caption1.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), padding: const EdgeInsets.all(10), decoration: BoxDecoration( color: ext.bgSecondary, @@ -173,7 +173,7 @@ class _FontComparisonPageState extends State { children: [ Text( font.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/settings/presentation/font/font_preview_sheet.dart b/lib/features/mine/settings/presentation/font/font_preview_sheet.dart index 2eec99e6..8b47679e 100644 --- a/lib/features/mine/settings/presentation/font/font_preview_sheet.dart +++ b/lib/features/mine/settings/presentation/font/font_preview_sheet.dart @@ -109,7 +109,7 @@ class _FontPreviewSheetState extends ConsumerState { tag: 'font-preview-${widget.font.fontFamily}', child: Text( widget.font.name, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -134,10 +134,10 @@ class _FontPreviewSheetState extends ConsumerState { return CupertinoTextField( controller: _previewController, placeholder: '输入自定义预览文本', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontFamily: widget.font.fontFamily, ), @@ -158,7 +158,7 @@ class _FontPreviewSheetState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '字号', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(width: AppSpacing.sm), Expanded( @@ -173,7 +173,7 @@ class _FontPreviewSheetState extends ConsumerState { ), Text( _fontSize.round().toString(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -282,7 +282,7 @@ class _FontPreviewSheetState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( isActive ? '当前使用中' : '使用此字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isActive ? ext.textHint : CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -303,13 +303,13 @@ class _FontPreviewSheetState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.sm), Expanded( child: Text( value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/mine/settings/presentation/font_management_page.dart b/lib/features/mine/settings/presentation/font_management_page.dart index 89c0e208..ae2d66ef 100644 --- a/lib/features/mine/settings/presentation/font_management_page.dart +++ b/lib/features/mine/settings/presentation/font_management_page.dart @@ -68,7 +68,7 @@ class _FontManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( '字体管理', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), diff --git a/lib/features/mine/settings/presentation/font_widgets.dart b/lib/features/mine/settings/presentation/font_widgets.dart index 37f90709..ffd5cba2 100644 --- a/lib/features/mine/settings/presentation/font_widgets.dart +++ b/lib/features/mine/settings/presentation/font_widgets.dart @@ -39,8 +39,8 @@ class FontSearchBar extends ConsumerWidget { onChanged: (v) => ref.read(fontManagementProvider.notifier).setSearchQuery(v), placeholder: '搜索字体(支持拼音)', - placeholderStyle: AppTypography.of(context).subhead.copyWith(color: ext.textHint), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ); } } @@ -82,7 +82,7 @@ class FontQuickActions extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '导入字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -109,7 +109,7 @@ class FontQuickActions extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( 'URL下载', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -134,7 +134,7 @@ class FontQuickActions extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '在线字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -168,7 +168,7 @@ class FontQuickActions extends ConsumerWidget { // const SizedBox(width: AppSpacing.xs), // Text( // 'ZIP导入', - // style: AppTypography.of(context).subhead.copyWith( + // style: AppTypography.subhead.copyWith( // color: ext.accent, // fontWeight: FontWeight.w600, // ), @@ -196,7 +196,7 @@ class FontQuickActions extends ConsumerWidget { const SizedBox(height: 4), Text( '⬇️ 正在下载 ${fontState.urlDownloadName} ${(fontState.urlDownloadProgress * 100).toStringAsFixed(0)}%', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -235,10 +235,10 @@ class FontQuickActions extends ConsumerWidget { CupertinoTextField( controller: urlController, placeholder: '字体文件URL (.ttf/.otf)', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: dialogExt.textHint, ), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: dialogExt.textPrimary, ), clearButtonMode: OverlayVisibilityMode.editing, @@ -249,10 +249,10 @@ class FontQuickActions extends ConsumerWidget { CupertinoTextField( controller: nameController, placeholder: '字体名称 (可选)', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: dialogExt.textHint, ), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: dialogExt.textPrimary, ), clearButtonMode: OverlayVisibilityMode.editing, @@ -320,7 +320,7 @@ class FontActiveCard extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '当前字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -346,7 +346,7 @@ class FontActiveCard extends ConsumerWidget { tag: 'font-preview-${state.activeFontFamily}', child: Text( activeFont.name, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -400,7 +400,7 @@ class FontLocalSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '已安装字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -408,7 +408,7 @@ class FontLocalSection extends ConsumerWidget { const Spacer(), Text( '${state.filteredFonts.length}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -431,7 +431,7 @@ class FontLocalSection extends ConsumerWidget { padding: const EdgeInsets.all(AppSpacing.lg), child: Text( state.searchQuery.isNotEmpty ? '未找到匹配的字体' : '暂无字体,点击上方导入或下载', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ) @@ -593,7 +593,7 @@ class FontItemWidget extends StatelessWidget { children: [ Text( font.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -615,7 +615,7 @@ class FontItemWidget extends StatelessWidget { ), child: Text( '内置', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 9, ), @@ -635,7 +635,7 @@ class FontItemWidget extends StatelessWidget { ), child: Text( '已下载', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontSize: 9, ), @@ -657,7 +657,7 @@ class FontItemWidget extends StatelessWidget { const SizedBox(height: 1), Text( formatFileSize(font.fileSize!), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -704,7 +704,7 @@ class FontOnlineSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '在线字体', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -712,14 +712,14 @@ class FontOnlineSection extends ConsumerWidget { const Spacer(), Text( '${state.onlineFonts.where((f) => f.isDownloaded).length}/${state.onlineFonts.length}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), const SizedBox(height: AppSpacing.xs), Text( '点击下载并安装到本地,安装后可在上方切换使用', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), GestureDetector( @@ -737,14 +737,14 @@ class FontOnlineSection extends ConsumerWidget { children: [ Text( 'Google Fonts', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( '1500+ 在线字体', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -864,14 +864,14 @@ class FontOnlineItemWidget extends ConsumerWidget { children: [ Text( font.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( font.fontFamily, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -910,7 +910,7 @@ class FontOnlineItemWidget extends ConsumerWidget { const SizedBox(width: 2), Text( '已安装', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.successColor, fontWeight: FontWeight.w600, ), @@ -951,7 +951,7 @@ class FontOnlineItemWidget extends ConsumerWidget { const SizedBox(width: 4), Text( font.hasDownloadError && !isInstalled ? '重试' : '下载', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -979,7 +979,7 @@ class FontOnlineItemWidget extends ConsumerWidget { ), Text( '${(font.downloadProgress * 100).round()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 8, fontWeight: FontWeight.w600, @@ -991,7 +991,7 @@ class FontOnlineItemWidget extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '下载中...', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -1022,7 +1022,7 @@ class FontTipsSection extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '字体小贴士', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1055,7 +1055,7 @@ class FontTipsSection extends StatelessWidget { Expanded( child: Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ), ], diff --git a/lib/features/mine/settings/presentation/general/general_settings_actions.dart b/lib/features/mine/settings/presentation/general/general_settings_actions.dart index 637c9afd..84981e34 100644 --- a/lib/features/mine/settings/presentation/general/general_settings_actions.dart +++ b/lib/features/mine/settings/presentation/general/general_settings_actions.dart @@ -115,7 +115,7 @@ mixin GeneralSettingsActions on ConsumerState { children: [ Text( t.exportImportSettings, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -128,7 +128,7 @@ mixin GeneralSettingsActions on ConsumerState { borderRadius: AppRadius.mdBorder, child: Text( t.exportSettings, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, ), ), @@ -152,7 +152,7 @@ mixin GeneralSettingsActions on ConsumerState { borderRadius: AppRadius.mdBorder, child: Text( t.importSettings, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), onPressed: () { Navigator.pop(ctx); @@ -164,7 +164,7 @@ mixin GeneralSettingsActions on ConsumerState { CupertinoButton( child: Text( t.cancel, - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), onPressed: () => Navigator.pop(ctx), ), @@ -231,7 +231,7 @@ mixin GeneralSettingsActions on ConsumerState { controller: controller, maxLines: 6, placeholder: t.pasteJsonPlaceholder, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), diff --git a/lib/features/mine/settings/presentation/general/general_settings_page.dart b/lib/features/mine/settings/presentation/general/general_settings_page.dart index e7f9af2c..594ee452 100644 --- a/lib/features/mine/settings/presentation/general/general_settings_page.dart +++ b/lib/features/mine/settings/presentation/general/general_settings_page.dart @@ -259,7 +259,7 @@ class _GeneralSettingsPageState extends ConsumerState const SizedBox(width: 6), Text( t.generalSettings, - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -348,10 +348,10 @@ class _GeneralSettingsPageState extends ConsumerState ), ) : null, - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.sm, vertical: AppSpacing.sm, @@ -374,7 +374,7 @@ class _GeneralSettingsPageState extends ConsumerState children: [ Text( '搜索历史', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -384,7 +384,7 @@ class _GeneralSettingsPageState extends ConsumerState onTap: _clearHistory, child: Text( '清除', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), @@ -413,7 +413,7 @@ class _GeneralSettingsPageState extends ConsumerState ), child: Text( keyword, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -439,7 +439,7 @@ class _GeneralSettingsPageState extends ConsumerState const SizedBox(width: 6), Text( section.title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -482,14 +482,14 @@ class _GeneralSettingsPageState extends ConsumerState children: [ Text( item.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: item.isDestructive ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( item.subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -523,7 +523,7 @@ class _GeneralSettingsPageState extends ConsumerState titleColumn, Text( item.displayValue ?? '', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -549,7 +549,7 @@ class _GeneralSettingsPageState extends ConsumerState titleColumn, Text( item.displayValue ?? '', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -604,7 +604,7 @@ class _GeneralSettingsPageState extends ConsumerState const SizedBox(width: 6), Text( t.youMayBeLookingFor, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -676,7 +676,7 @@ class _GeneralSettingsPageState extends ConsumerState Expanded( child: Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), Icon(CupertinoIcons.chevron_right, size: 14, color: ext.textHint), @@ -694,7 +694,7 @@ class _GeneralSettingsPageState extends ConsumerState children: [ Text( '闲言 $_versionText', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 11, ), @@ -702,7 +702,7 @@ class _GeneralSettingsPageState extends ConsumerState const SizedBox(height: 2), Text( t.copyright, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/mine/settings/presentation/general/general_settings_pickers.dart b/lib/features/mine/settings/presentation/general/general_settings_pickers.dart index f7232959..c20c1829 100644 --- a/lib/features/mine/settings/presentation/general/general_settings_pickers.dart +++ b/lib/features/mine/settings/presentation/general/general_settings_pickers.dart @@ -45,7 +45,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.vibrationStrength, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -71,7 +71,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( level.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -106,7 +106,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.soundEffectStyle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -131,7 +131,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( type.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -166,7 +166,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.screenTimeoutTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -190,7 +190,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( opt.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -225,7 +225,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.startupPageTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -249,7 +249,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( '${opt.icon} ${opt.label}', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -284,7 +284,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.pageTransitionModeTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -309,7 +309,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( mode.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -385,14 +385,14 @@ mixin GeneralSettingsPickers on ConsumerState { children: [ Text( t.standardNavigation, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( t.navigateDescDetail, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -451,14 +451,14 @@ mixin GeneralSettingsPickers on ConsumerState { children: [ Text( t.bottomSheet, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( t.sheetDescDetail, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -491,7 +491,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.contentDensityTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -516,7 +516,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( density.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -551,7 +551,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.cacheStrategyTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -576,7 +576,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( strategy.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -611,7 +611,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( t.imageQualityTitle, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -636,7 +636,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( quality.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -670,7 +670,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '🎵 音效类型', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -694,7 +694,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( style.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -729,7 +729,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '💡 屏幕常亮', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -752,7 +752,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -800,7 +800,7 @@ mixin GeneralSettingsPickers on ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '⏰ 提醒时间', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -824,7 +824,7 @@ mixin GeneralSettingsPickers on ConsumerState { return Center( child: Text( opt.$3, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/mine/settings/presentation/language_settings_page.dart b/lib/features/mine/settings/presentation/language_settings_page.dart index 370ae059..3c140422 100644 --- a/lib/features/mine/settings/presentation/language_settings_page.dart +++ b/lib/features/mine/settings/presentation/language_settings_page.dart @@ -44,7 +44,7 @@ class LanguageSettingsPage extends ConsumerWidget { const SizedBox(width: 6), Text( t.settings.selectLanguage, - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -98,7 +98,7 @@ class LanguageSettingsPage extends ConsumerWidget { padding: const EdgeInsets.only(left: AppSpacing.xs), child: Text( title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -130,7 +130,7 @@ class LanguageSettingsPage extends ConsumerWidget { children: [ Text( locale.nativeName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -150,7 +150,7 @@ class LanguageSettingsPage extends ConsumerWidget { ), child: Text( 'RTL', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFF5856D6), fontSize: 9, fontWeight: FontWeight.w700, @@ -163,7 +163,7 @@ class LanguageSettingsPage extends ConsumerWidget { if (locale.nativeName != locale.englishName) Text( locale.englishName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -191,7 +191,7 @@ class LanguageSettingsPage extends ConsumerWidget { const SizedBox(width: 4), Text( t.common.enabled, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -234,14 +234,14 @@ class LanguageSettingsPage extends ConsumerWidget { children: [ Text( t.settings.collaborativeTranslation, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( t.settings.collaborativeTranslationDesc, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -358,7 +358,7 @@ class LanguageSettingsPage extends ConsumerWidget { placeholder: 'Paste translation JSON...', maxLines: 6, minLines: 3, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary.withValues(alpha: 0.5), borderRadius: AppRadius.mdBorder, @@ -421,7 +421,7 @@ class LanguageSettingsPage extends ConsumerWidget { const SizedBox(width: 6), Text( '📊 ${'Translation Coverage'}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -429,7 +429,7 @@ class LanguageSettingsPage extends ConsumerWidget { const Spacer(), Text( '$total ${'fields'}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -460,7 +460,7 @@ class LanguageSettingsPage extends ConsumerWidget { width: 80, child: Text( locale.nativeName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -500,7 +500,7 @@ class LanguageSettingsPage extends ConsumerWidget { width: 42, child: Text( '$percentage%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isComplete ? CupertinoColors.systemGreen : ext.textHint, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/settings/presentation/lock/app_lock_overlay.dart b/lib/features/mine/settings/presentation/lock/app_lock_overlay.dart index ab222532..778d6b2f 100644 --- a/lib/features/mine/settings/presentation/lock/app_lock_overlay.dart +++ b/lib/features/mine/settings/presentation/lock/app_lock_overlay.dart @@ -258,7 +258,7 @@ class _AppLockOverlayState extends ConsumerState controller: controller, obscureText: true, placeholder: '输入你的账号密码', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), actions: [ @@ -356,7 +356,7 @@ class _AppLockOverlayState extends ConsumerState if (_lockoutText.isNotEmpty) Text( _lockoutText, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.errorColor, fontWeight: FontWeight.w600, ), @@ -364,7 +364,7 @@ class _AppLockOverlayState extends ConsumerState else Text( _statusText, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _isError ? ext.errorColor : ext.textSecondary, ), ), @@ -400,7 +400,7 @@ class _AppLockOverlayState extends ConsumerState const SizedBox(height: AppSpacing.md), Text( '闲言', - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -597,7 +597,7 @@ class _AppLockOverlayState extends ConsumerState : () => _onPinDigit(key), child: Text( key, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w400, ), @@ -632,7 +632,7 @@ class _AppLockOverlayState extends ConsumerState CupertinoButton( child: Text( '点击验证', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), onPressed: _tryBiometric, ), @@ -644,7 +644,7 @@ class _AppLockOverlayState extends ConsumerState return CupertinoButton( child: Text( '忘记密码?', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), onPressed: _onForgotPassword, ); diff --git a/lib/features/mine/settings/presentation/more_settings_page.dart b/lib/features/mine/settings/presentation/more_settings_page.dart index dc8cbc21..bea29c62 100644 --- a/lib/features/mine/settings/presentation/more_settings_page.dart +++ b/lib/features/mine/settings/presentation/more_settings_page.dart @@ -56,7 +56,7 @@ class _MoreSettingsPageState extends ConsumerState { const SizedBox(width: 6), Text( '更多设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -200,7 +200,7 @@ class _MoreSettingsPageState extends ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -219,7 +219,7 @@ class _MoreSettingsPageState extends ConsumerState { (label) => Center( child: Text( label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -263,7 +263,7 @@ class _MoreSettingsPageState extends ConsumerState { const SizedBox(height: 12), Text( '此操作将清除所有数据,包括:', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const SizedBox(height: 8), _buildResetItem('🗑 账户与登录状态'), @@ -274,7 +274,7 @@ class _MoreSettingsPageState extends ConsumerState { const SizedBox(height: 12), Text( '输入"重置"以确认操作', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFFFF3B30), fontWeight: FontWeight.w600, ), @@ -283,10 +283,10 @@ class _MoreSettingsPageState extends ConsumerState { CupertinoTextField( controller: confirmController, placeholder: '请输入"重置"', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), textAlign: TextAlign.center, padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, @@ -338,7 +338,7 @@ class _MoreSettingsPageState extends ConsumerState { Expanded( child: Text( text, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFFFF3B30), ), ), @@ -367,7 +367,7 @@ class _MoreSettingsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '正在重置...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ], ), diff --git a/lib/features/mine/settings/presentation/notification_settings_page.dart b/lib/features/mine/settings/presentation/notification_settings_page.dart index e8f03e22..3c7d3387 100644 --- a/lib/features/mine/settings/presentation/notification_settings_page.dart +++ b/lib/features/mine/settings/presentation/notification_settings_page.dart @@ -262,7 +262,7 @@ class _NotificationSettingsPageState const SizedBox(width: 6), Text( '通知设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -329,14 +329,14 @@ class _NotificationSettingsPageState children: [ Text( '推送通知管理', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( '自定义各类通知的推送时间和开关', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -618,7 +618,7 @@ class _NotificationSettingsPageState children: [ Text( '温馨提示', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -626,7 +626,7 @@ class _NotificationSettingsPageState const SizedBox(height: 4), Text( '通知需要系统权限支持。如未收到推送,请在系统设置中检查闲言的通知权限是否已开启。', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -668,14 +668,14 @@ class _NotificationSettingsPageState children: [ Text( '$emoji $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -725,7 +725,7 @@ class _NotificationSettingsPageState const SizedBox(width: AppSpacing.sm), Text( title, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), Container( @@ -739,7 +739,7 @@ class _NotificationSettingsPageState ), child: Text( timeStr, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -789,7 +789,7 @@ class _NotificationSettingsPageState padding: EdgeInsets.zero, child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -797,7 +797,7 @@ class _NotificationSettingsPageState ), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -806,7 +806,7 @@ class _NotificationSettingsPageState padding: EdgeInsets.zero, child: Text( '确定', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/settings/presentation/other_settings_page.dart b/lib/features/mine/settings/presentation/other_settings_page.dart index bfaee909..632a1a06 100644 --- a/lib/features/mine/settings/presentation/other_settings_page.dart +++ b/lib/features/mine/settings/presentation/other_settings_page.dart @@ -49,7 +49,7 @@ class _OtherSettingsPageState extends ConsumerState { const SizedBox(width: 6), Text( '其他设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -290,7 +290,7 @@ class _OtherSettingsPageState extends ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '色弱适配', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -315,7 +315,7 @@ class _OtherSettingsPageState extends ConsumerState { (e) => Center( child: Text( e.label, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -419,7 +419,7 @@ class _OtherSettingsPageState extends ConsumerState { children: [ Text( '导出/导入设置', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -432,7 +432,7 @@ class _OtherSettingsPageState extends ConsumerState { borderRadius: AppRadius.mdBorder, child: Text( '导出设置', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, ), ), @@ -456,7 +456,7 @@ class _OtherSettingsPageState extends ConsumerState { borderRadius: AppRadius.mdBorder, child: Text( '导入设置', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), onPressed: () { Navigator.pop(ctx); @@ -468,7 +468,7 @@ class _OtherSettingsPageState extends ConsumerState { CupertinoButton( child: Text( '取消', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), onPressed: () => Navigator.pop(ctx), ), @@ -491,7 +491,7 @@ class _OtherSettingsPageState extends ConsumerState { controller: controller, maxLines: 6, placeholder: '粘贴导出的 JSON 数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), @@ -570,7 +570,7 @@ class _OtherSettingsPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '暂无变更记录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -597,7 +597,7 @@ class _OtherSettingsPageState extends ConsumerState { children: [ Text( entry.key, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -605,7 +605,7 @@ class _OtherSettingsPageState extends ConsumerState { const Spacer(), Text( time, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -614,7 +614,7 @@ class _OtherSettingsPageState extends ConsumerState { const SizedBox(height: 2), Text( '${entry.oldValue} → ${entry.newValue}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -631,6 +631,7 @@ class _OtherSettingsPageState extends ConsumerState { child: const Text('清空日志'), onPressed: () async { await SettingsChangeLogger.clear(); + if (!context.mounted) return; Navigator.pop(ctx); setState(() {}); }, diff --git a/lib/features/mine/settings/presentation/privacy/crash_log_page.dart b/lib/features/mine/settings/presentation/privacy/crash_log_page.dart index 6179ad19..49907da5 100644 --- a/lib/features/mine/settings/presentation/privacy/crash_log_page.dart +++ b/lib/features/mine/settings/presentation/privacy/crash_log_page.dart @@ -171,7 +171,7 @@ class _CrashLogPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( _isSelectMode ? '已选择 ${_selectedIds.length} 项' : '崩溃日志', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -262,12 +262,12 @@ class _CrashLogPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无崩溃日志 🎉', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.xs), Text( '应用运行正常', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -313,7 +313,7 @@ class _CrashLogPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( entry.errorId, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, fontFamily: 'monospace', @@ -322,7 +322,7 @@ class _CrashLogPageState extends ConsumerState { const Spacer(), Text( _formatTime(entry.time), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), @@ -332,7 +332,7 @@ class _CrashLogPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( errorPreview, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), @@ -420,7 +420,7 @@ class _CrashLogDetailPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( entry.errorId, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), @@ -514,7 +514,7 @@ class _CrashLogDetailPage extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '$label: ', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -522,7 +522,7 @@ class _CrashLogDetailPage extends ConsumerWidget { Expanded( child: Text( value, - style: AppTypography.of(context).caption1.copyWith(color: ext.textPrimary), + style: AppTypography.caption1.copyWith(color: ext.textPrimary), ), ), ], @@ -553,7 +553,7 @@ class _CrashLogDetailPage extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( 'Error', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFFFF3B30), fontWeight: FontWeight.w600, ), @@ -563,7 +563,7 @@ class _CrashLogDetailPage extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), SelectableText( entry.error, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), @@ -589,7 +589,7 @@ class _CrashLogDetailPage extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( 'Stack Trace', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -599,7 +599,7 @@ class _CrashLogDetailPage extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), SelectableText( entry.stackTrace, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: 'monospace', fontSize: 10, diff --git a/lib/features/mine/settings/presentation/privacy/log_viewer_page.dart b/lib/features/mine/settings/presentation/privacy/log_viewer_page.dart index 6f581e13..9d9cf3e7 100644 --- a/lib/features/mine/settings/presentation/privacy/log_viewer_page.dart +++ b/lib/features/mine/settings/presentation/privacy/log_viewer_page.dart @@ -49,7 +49,7 @@ class _LogViewerPageState extends State { leading: const AdaptiveBackButton(), middle: Text( '日志查看器', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -102,7 +102,7 @@ class _LogViewerPageState extends State { ), child: Text( level.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textHint, fontWeight: isSelected ? FontWeight.w600 @@ -125,7 +125,7 @@ class _LogViewerPageState extends State { children: [ Icon(CupertinoIcons.doc_text, size: 48, color: ext.textHint), const SizedBox(height: AppSpacing.md), - Text('暂无日志', style: AppTypography.of(context).body.copyWith(color: ext.textHint)), + Text('暂无日志', style: AppTypography.body.copyWith(color: ext.textHint)), ], ), ); @@ -152,7 +152,7 @@ class _LogViewerPageState extends State { const SizedBox(width: AppSpacing.sm), Text( entry.level.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _levelColor(entry.level), fontWeight: FontWeight.w600, ), @@ -160,7 +160,7 @@ class _LogViewerPageState extends State { const Spacer(), Text( _formatTime(entry.time), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), @@ -170,7 +170,7 @@ class _LogViewerPageState extends State { const SizedBox(height: AppSpacing.xs), Text( entry.message, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontFamily: 'monospace', ), diff --git a/lib/features/mine/settings/presentation/privacy/permission_management_page.dart b/lib/features/mine/settings/presentation/privacy/permission_management_page.dart index 5aab78c4..65148cbf 100644 --- a/lib/features/mine/settings/presentation/privacy/permission_management_page.dart +++ b/lib/features/mine/settings/presentation/privacy/permission_management_page.dart @@ -58,7 +58,7 @@ class _PermissionManagementPageState const SizedBox(width: 6), Text( '权限管理', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -71,7 +71,7 @@ class _PermissionManagementPageState error: (e, _) => Center( child: Text( '加载失败', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), ), data: (statuses) => RefreshIndicator( @@ -120,7 +120,7 @@ class _PermissionManagementPageState const SizedBox(width: AppSpacing.sm), Text( '权限说明', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -130,7 +130,7 @@ class _PermissionManagementPageState const SizedBox(height: AppSpacing.sm), Text( '闲言仅请求必要权限以提供核心功能。你可以随时在此页面管理权限设置。拒绝某些权限可能会影响相关功能的使用。', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], ), @@ -149,7 +149,7 @@ class _PermissionManagementPageState children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -157,7 +157,7 @@ class _PermissionManagementPageState const SizedBox(width: AppSpacing.xs), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -210,7 +210,7 @@ class _PermissionManagementPageState padding: const EdgeInsets.symmetric(horizontal: AppSpacing.xs), child: Text( '闲言不会过度索取权限。部分权限仅在特定功能使用时才会请求。', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 11, ), @@ -289,7 +289,7 @@ class _PermissionCard extends StatelessWidget { Expanded( child: Text( permission.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -338,7 +338,7 @@ class _PermissionCard extends StatelessWidget { const SizedBox(width: 2), Text( '系统级', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFF5856D6), fontSize: 10, fontWeight: FontWeight.w600, @@ -361,7 +361,7 @@ class _PermissionCard extends StatelessWidget { ), child: Text( text, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: color, fontSize: 10, fontWeight: FontWeight.w600, @@ -413,7 +413,7 @@ class _PermissionCard extends StatelessWidget { const SizedBox(width: 2), Text( text, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: color, fontSize: 9, fontWeight: FontWeight.w600, @@ -428,7 +428,7 @@ class _PermissionCard extends StatelessWidget { Widget _buildDescription(AppThemeExtension ext) { return Text( permission.description, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.4, ), @@ -457,7 +457,7 @@ class _PermissionCard extends StatelessWidget { Expanded( child: Text( scene, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 11, height: 1.3, @@ -504,7 +504,7 @@ class _PermissionCard extends StatelessWidget { onPressed: onOpenSettings, child: Text( '去设置', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: const Color(0xFF007AFF), fontWeight: FontWeight.w600, ), @@ -520,7 +520,7 @@ class _PermissionCard extends StatelessWidget { onPressed: onRequest, child: Text( '请求', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/settings/presentation/privacy/privacy_policy_page.dart b/lib/features/mine/settings/presentation/privacy/privacy_policy_page.dart index 7e50a6fc..090e8069 100644 --- a/lib/features/mine/settings/presentation/privacy/privacy_policy_page.dart +++ b/lib/features/mine/settings/presentation/privacy/privacy_policy_page.dart @@ -26,7 +26,7 @@ class PrivacyPolicyPage extends StatelessWidget { leading: const AdaptiveBackButton(), middle: Text( '隐私政策', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -49,7 +49,7 @@ class PrivacyPolicyPage extends StatelessWidget { const SizedBox(height: AppSpacing.xl), Text( '最后更新日期:2026年5月7日', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.xl), @@ -65,7 +65,7 @@ class PrivacyPolicyPage extends StatelessWidget { children: [ Text( '🔒 闲言APP 隐私政策', - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -73,7 +73,7 @@ class PrivacyPolicyPage extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '我们非常重视您的隐私保护。本隐私政策说明我们如何收集、使用、存储和保护您的个人信息。', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ); @@ -87,7 +87,7 @@ class PrivacyPolicyPage extends StatelessWidget { children: [ Text( title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -95,7 +95,7 @@ class PrivacyPolicyPage extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.6, ), diff --git a/lib/features/mine/settings/presentation/shared/settings_tiles.dart b/lib/features/mine/settings/presentation/shared/settings_tiles.dart index e9cf1e20..9c8f8f61 100644 --- a/lib/features/mine/settings/presentation/shared/settings_tiles.dart +++ b/lib/features/mine/settings/presentation/shared/settings_tiles.dart @@ -40,7 +40,7 @@ class SettingsSectionCard extends StatelessWidget { const SizedBox(width: 6), Text( header, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -97,8 +97,8 @@ class SettingsSwitchTile extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(title, style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), - Text(subtitle, style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), + Text(title, style: AppTypography.subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text(subtitle, style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), ], ), ), @@ -147,12 +147,12 @@ class SettingsNavigationTile extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(title, style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), - Text(subtitle, style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), + Text(title, style: AppTypography.subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text(subtitle, style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), ], ), ), - if (trailing != null) Text(trailing!, style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary)), + if (trailing != null) Text(trailing!, style: AppTypography.caption1.copyWith(color: ext.textSecondary)), if (trailing != null) const SizedBox(width: 4), Icon(CupertinoIcons.chevron_right, size: 16, color: ext.textHint), ], @@ -200,8 +200,8 @@ class SettingsActionTile extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(title, style: AppTypography.of(context).subhead.copyWith(color: isDestructive ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w500)), - Text(subtitle, style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), + Text(title, style: AppTypography.subhead.copyWith(color: isDestructive ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w500)), + Text(subtitle, style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), ], ), ), @@ -253,12 +253,12 @@ class SettingsSelectionTile extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(title, style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), - Text(subtitle, style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), + Text(title, style: AppTypography.subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text(subtitle, style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis), ], ), ), - Text(value, style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary)), + Text(value, style: AppTypography.caption1.copyWith(color: ext.textSecondary)), const SizedBox(width: 4), Icon(CupertinoIcons.chevron_right, size: 14, color: ext.textHint), ], diff --git a/lib/features/mine/settings/presentation/smart_mode_settings_page.dart b/lib/features/mine/settings/presentation/smart_mode_settings_page.dart index a225f518..6d27ef46 100644 --- a/lib/features/mine/settings/presentation/smart_mode_settings_page.dart +++ b/lib/features/mine/settings/presentation/smart_mode_settings_page.dart @@ -48,7 +48,7 @@ class _SmartModeSettingsPageState extends ConsumerState { const SizedBox(width: 6), Text( '智能模式', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -126,13 +126,13 @@ class _SmartModeSettingsPageState extends ConsumerState { children: [ Text( '当前模式', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), Text( modeInfo.label, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -159,7 +159,7 @@ class _SmartModeSettingsPageState extends ConsumerState { const SizedBox(width: 4), Text( networkLabel, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -178,7 +178,7 @@ class _SmartModeSettingsPageState extends ConsumerState { ), child: Text( modeInfo.description, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -218,14 +218,14 @@ class _SmartModeSettingsPageState extends ConsumerState { children: [ Text( '自动模式', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( isAuto ? '根据网络自动切换' : '手动选择浏览模式', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -284,14 +284,14 @@ class _SmartModeSettingsPageState extends ConsumerState { children: [ Text( '手动模式', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isAuto ? ext.textHint : ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( isAuto ? '关闭自动模式后可手动选择' : '选择你偏好的浏览模式', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -354,7 +354,7 @@ class _SmartModeSettingsPageState extends ConsumerState { children: [ Text( info.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: enabled ? ext.textPrimary : ext.textHint, fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, @@ -362,7 +362,7 @@ class _SmartModeSettingsPageState extends ConsumerState { ), Text( info.shortDesc, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -397,7 +397,7 @@ class _SmartModeSettingsPageState extends ConsumerState { const SizedBox(width: 6), Text( '模式说明', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -441,14 +441,14 @@ class _SmartModeSettingsPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( desc, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/mine/settings/presentation/theme/theme_sections_basic.dart b/lib/features/mine/settings/presentation/theme/theme_sections_basic.dart index ca60b42c..b1ab7c0d 100644 --- a/lib/features/mine/settings/presentation/theme/theme_sections_basic.dart +++ b/lib/features/mine/settings/presentation/theme/theme_sections_basic.dart @@ -80,7 +80,7 @@ class PresetSection extends ConsumerWidget { const SizedBox(height: 4), Text( preset.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: accent.color, fontWeight: FontWeight.w600, ), @@ -173,7 +173,7 @@ class AutoDarkSection extends ConsumerWidget { const SizedBox(height: AppSpacing.sm), Text( '将根据日落日出时间自动切换(约 18:00 – 06:30)', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ], @@ -220,7 +220,7 @@ class SchedulePicker extends ConsumerWidget { const SizedBox(width: 6), Text( _formatTime(settings.darkScheduleStart), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -258,7 +258,7 @@ class SchedulePicker extends ConsumerWidget { const SizedBox(width: 6), Text( _formatTime(settings.darkScheduleEnd), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -427,7 +427,7 @@ class AccentColorSection extends ConsumerWidget { const SizedBox(width: 4), Text( settings.accentColor.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -477,13 +477,13 @@ class AccentColorSection extends ConsumerWidget { children: [ Text( '色相', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), Text( '$hue°', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -550,7 +550,7 @@ class FontSection extends ConsumerWidget { const SizedBox(height: AppSpacing.sm), Text( '字体大小', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: 4), Row( @@ -567,7 +567,7 @@ class FontSection extends ConsumerWidget { const SizedBox(height: AppSpacing.sm), Text( '字体粗细', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: 4), Row( @@ -595,7 +595,7 @@ class FontSection extends ConsumerWidget { children: [ Text( '字体样式', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -603,7 +603,7 @@ class FontSection extends ConsumerWidget { const SizedBox(height: 2), Text( '${activeFont.name} · AaBbCc 你好世界', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: fontState.activeFontFamily, ), diff --git a/lib/features/mine/settings/presentation/theme/theme_sections_preview.dart b/lib/features/mine/settings/presentation/theme/theme_sections_preview.dart index 39c23c92..34d05a5c 100644 --- a/lib/features/mine/settings/presentation/theme/theme_sections_preview.dart +++ b/lib/features/mine/settings/presentation/theme/theme_sections_preview.dart @@ -111,7 +111,7 @@ class PreviewCard extends ConsumerWidget { Expanded( child: Text( '圆角: ${settings.cornerRadius.label} · 卡片: ${settings.cardStyle.label} · 毛玻璃: ${settings.glassIntensity.label}', - style: AppTypography.of(context).caption1.copyWith(color: accent.color), + style: AppTypography.caption1.copyWith(color: accent.color), ), ), ], @@ -322,7 +322,7 @@ class ShareSection extends ConsumerWidget { const SizedBox(width: 6), Text( '导出JSON', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -355,7 +355,7 @@ class ShareSection extends ConsumerWidget { const SizedBox(width: 6), Text( '导入JSON', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/mine/settings/presentation/theme/theme_sections_style.dart b/lib/features/mine/settings/presentation/theme/theme_sections_style.dart index 4192ff8e..8f2963d5 100644 --- a/lib/features/mine/settings/presentation/theme/theme_sections_style.dart +++ b/lib/features/mine/settings/presentation/theme/theme_sections_style.dart @@ -64,7 +64,7 @@ class CornerRadiusSection extends ConsumerWidget { child: Center( child: Text( '预览圆角', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ), @@ -136,7 +136,7 @@ class TabExpressionStyleSection extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), Text( '底部导航图标选中时的表情表现力', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -170,7 +170,7 @@ class TabExpressionStyleSection extends ConsumerWidget { const SizedBox(height: 4), Text( opt.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -213,7 +213,7 @@ class TabCharacterStyleSection extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), Text( '底部导航图标的角色造型,宠物或人物', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -260,7 +260,7 @@ class TabCharacterStyleSection extends ConsumerWidget { children: [ Text( categoryLabel, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), @@ -294,7 +294,7 @@ class TabCharacterStyleSection extends ConsumerWidget { const SizedBox(height: 2), Text( opt.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -336,7 +336,7 @@ class BubbleStyleSection extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), Text( '聊天页面的气泡外观,全局生效', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -374,7 +374,7 @@ class BubbleStyleSection extends ConsumerWidget { const SizedBox(height: 4), Text( opt.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -437,7 +437,7 @@ class WallpaperSection extends ConsumerWidget { const SizedBox(width: 6), Text( '从相册选择', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -471,7 +471,7 @@ class WallpaperSection extends ConsumerWidget { const SizedBox(width: 6), Text( '清除壁纸', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -495,7 +495,7 @@ class WallpaperSection extends ConsumerWidget { Expanded( child: Text( '壁纸已设置', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), overflow: TextOverflow.ellipsis, ), ), @@ -698,7 +698,7 @@ class ThemeResetButton extends ConsumerWidget { const SizedBox(width: 6), Text( '重置为默认设置', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/mine/settings/presentation/theme/theme_settings_page.dart b/lib/features/mine/settings/presentation/theme/theme_settings_page.dart index 4d404a23..88aa6833 100644 --- a/lib/features/mine/settings/presentation/theme/theme_settings_page.dart +++ b/lib/features/mine/settings/presentation/theme/theme_settings_page.dart @@ -37,7 +37,7 @@ class ThemeSettingsPage extends ConsumerWidget { const SizedBox(width: 6), Text( '主题个性化', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), diff --git a/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart b/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart index 028354f1..193314ed 100644 --- a/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart +++ b/lib/features/mine/settings/presentation/theme/theme_shared_widgets.dart @@ -29,7 +29,7 @@ class ThemeSectionHeader extends StatelessWidget { const SizedBox(width: 6), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -88,7 +88,7 @@ class ThemeOptionChip extends StatelessWidget { ], Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 diff --git a/lib/features/mine/signin/presentation/signin_page.dart b/lib/features/mine/signin/presentation/signin_page.dart index 597f1a9c..2bb5aceb 100644 --- a/lib/features/mine/signin/presentation/signin_page.dart +++ b/lib/features/mine/signin/presentation/signin_page.dart @@ -163,7 +163,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '查看成就中心', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -178,7 +178,7 @@ class _SigninPageState extends ConsumerState { ), child: Text( signinState.successMsg!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.accent, ), ).animate().fadeIn(duration: 300.ms), @@ -190,7 +190,7 @@ class _SigninPageState extends ConsumerState { ), child: Text( signinState.error!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.systemRed, ), ), @@ -264,12 +264,12 @@ class _SigninPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( isSigned ? '今日已签到' : '点击签到', - style: AppTypography.of(context).title2.copyWith(color: ext.textPrimary), + style: AppTypography.title2.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.xs), Text( '连续签到 ${signinState.continuous} 天', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), if (user != null) ...[ const SizedBox(height: AppSpacing.xs), @@ -284,7 +284,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 4), Text( '积分: ${user.score}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -309,7 +309,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 3), Text( getLevelBadge(user.level), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: getLevelColor(user.level), fontWeight: FontWeight.w600, ), @@ -354,7 +354,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( isSigned ? '已签到' : '签到', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -393,7 +393,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '本周签到', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -407,7 +407,7 @@ class _SigninPageState extends ConsumerState { children: [ Text( days[i], - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isToday ? ext.accent : ext.textSecondary, ), ), @@ -480,7 +480,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '${now.year}年${now.month}月', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -488,7 +488,7 @@ class _SigninPageState extends ConsumerState { ), Text( '累计${signinState.totalSignins}天', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -504,7 +504,7 @@ class _SigninPageState extends ConsumerState { child: Center( child: Text( d, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -600,7 +600,7 @@ class _SigninPageState extends ConsumerState { ) : Text( '$day', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isFuture ? ext.textHint : ext.textSecondary, ), ), @@ -653,7 +653,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '补签日期', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -661,7 +661,7 @@ class _SigninPageState extends ConsumerState { ), Text( dateStr, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -683,7 +683,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '消耗积分', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -691,7 +691,7 @@ class _SigninPageState extends ConsumerState { ), Text( '-10', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w600, ), @@ -715,7 +715,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(width: 6), Text( '补签说明', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -726,7 +726,7 @@ class _SigninPageState extends ConsumerState { const SizedBox(height: 4), Text( '每日仅可补签1次,积分不足将无法补签', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/mine/user_center/presentation/coin_log_page.dart b/lib/features/mine/user_center/presentation/coin_log_page.dart index 0bb744b9..36a4a28e 100644 --- a/lib/features/mine/user_center/presentation/coin_log_page.dart +++ b/lib/features/mine/user_center/presentation/coin_log_page.dart @@ -130,14 +130,14 @@ class _CoinLogPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '暂无金币记录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), const SizedBox(height: AppSpacing.xs), Text( '签到或互动即可获得积分', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -161,7 +161,7 @@ class _CoinLogPageState extends ConsumerState { ref.read(coinProvider.notifier).loadCoinLog(), child: Text( '加载更多', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), @@ -202,7 +202,7 @@ class _CoinLogPageState extends ConsumerState { ), child: Text( entry.key, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -299,7 +299,7 @@ class _CoinSummaryDashboard extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '收支概览', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -378,7 +378,7 @@ class _StatCard extends StatelessWidget { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: color, fontWeight: FontWeight.w700, ), @@ -386,7 +386,7 @@ class _StatCard extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), @@ -427,7 +427,7 @@ class _CoinTrendChart extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '近7日趋势', - style: AppTypography.of(context).callout.copyWith(color: ext.textPrimary), + style: AppTypography.callout.copyWith(color: ext.textPrimary), ), const Spacer(), _LegendDot( @@ -450,7 +450,7 @@ class _CoinTrendChart extends StatelessWidget { ? Center( child: Text( '暂无数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -521,7 +521,7 @@ class _CoinTrendChart extends StatelessWidget { final val = rodIndex == 0 ? d.gain : d.loss; return BarTooltipItem( '$label: $val', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -546,7 +546,7 @@ class _CoinTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 4), child: Text( data[idx].day, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -613,7 +613,7 @@ class _LegendDot extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -687,7 +687,7 @@ class _SourceFilter extends StatelessWidget { const SizedBox(width: 4), Text( name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -747,7 +747,7 @@ class _CoinLogCard extends StatelessWidget { item.remark.isNotEmpty ? item.remark : _sourceName(item.action), - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -759,7 +759,7 @@ class _CoinLogCard extends StatelessWidget { children: [ Text( _formatTime(item.createtime), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -777,7 +777,7 @@ class _CoinLogCard extends StatelessWidget { ), child: Text( _sourceName(item.action), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _sourceBgColor(item.action), fontSize: 10, ), @@ -793,7 +793,7 @@ class _CoinLogCard extends StatelessWidget { children: [ Text( item.amountText, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: isPositive ? CupertinoColors.systemGreen : CupertinoColors.systemRed, @@ -803,7 +803,7 @@ class _CoinLogCard extends StatelessWidget { const SizedBox(height: 2), Text( '余额 ${item.after}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/mine/user_center/presentation/devices/device_card.dart b/lib/features/mine/user_center/presentation/devices/device_card.dart index 7a409e4e..d76ff584 100644 --- a/lib/features/mine/user_center/presentation/devices/device_card.dart +++ b/lib/features/mine/user_center/presentation/devices/device_card.dart @@ -46,7 +46,7 @@ class DeviceSectionHeader extends StatelessWidget { const SizedBox(width: 6), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -60,7 +60,7 @@ class DeviceSectionHeader extends StatelessWidget { ), child: Text( '$count', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontWeight: FontWeight.w600, ), @@ -117,7 +117,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(width: 4), Text( '重命名', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -167,7 +167,7 @@ class DeviceCard extends StatelessWidget { Expanded( child: Text( displayName, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -199,7 +199,7 @@ class DeviceCard extends StatelessWidget { const SizedBox(height: 2), Text( device.ip, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: 'SF Mono', ), diff --git a/lib/features/mine/user_center/presentation/devices/device_detail_sheet.dart b/lib/features/mine/user_center/presentation/devices/device_detail_sheet.dart index cfd3c8d1..58d9f3c9 100644 --- a/lib/features/mine/user_center/presentation/devices/device_detail_sheet.dart +++ b/lib/features/mine/user_center/presentation/devices/device_detail_sheet.dart @@ -44,13 +44,13 @@ class DeviceInfoRow extends StatelessWidget { const SizedBox(width: 8), Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const Spacer(), Flexible( child: Text( value, - style: AppTypography.of(context).caption1.copyWith(color: ext.textPrimary), + style: AppTypography.caption1.copyWith(color: ext.textPrimary), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -134,7 +134,7 @@ Future showDeviceDetailSheet({ Flexible( child: Text( displayName, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -155,7 +155,7 @@ Future showDeviceDetailSheet({ ), child: Text( '当前', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -180,7 +180,7 @@ Future showDeviceDetailSheet({ const SizedBox(width: 4), Text( isOnline ? '在线' : '离线', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isOnline ? CupertinoColors.systemGreen : ext.textHint, @@ -282,7 +282,7 @@ Future showDeviceDetailSheet({ }, child: Text( '修改名称', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, ), ), @@ -300,7 +300,7 @@ Future showDeviceDetailSheet({ }, child: Text( '下线此设备', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -317,7 +317,7 @@ Future showDeviceDetailSheet({ }, child: Text( '移除设备', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -330,7 +330,7 @@ Future showDeviceDetailSheet({ onPressed: () => Navigator.pop(ctx), child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/mine/user_center/presentation/devices/device_overview_card.dart b/lib/features/mine/user_center/presentation/devices/device_overview_card.dart index 08f35b96..00b30fd7 100644 --- a/lib/features/mine/user_center/presentation/devices/device_overview_card.dart +++ b/lib/features/mine/user_center/presentation/devices/device_overview_card.dart @@ -56,7 +56,7 @@ class DeviceOverviewCard extends StatelessWidget { children: [ Text( '设备概览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -64,7 +64,7 @@ class DeviceOverviewCard extends StatelessWidget { const SizedBox(height: 2), Text( '${state.onlineCount} 台在线 · 共 ${state.devices.length} 台设备', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -81,7 +81,7 @@ class DeviceOverviewCard extends StatelessWidget { const SizedBox(width: 3), Text( currentDevice.ipCity, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -116,7 +116,7 @@ class DeviceOverviewCard extends StatelessWidget { const SizedBox(width: 4), Text( '在线', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -173,7 +173,7 @@ class FileTransferEntry extends StatelessWidget { children: [ Text( '文件传输助手', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -181,7 +181,7 @@ class FileTransferEntry extends StatelessWidget { const SizedBox(height: 2), Text( '在设备间快速传输文件', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/mine/user_center/presentation/learning_center_page.dart b/lib/features/mine/user_center/presentation/learning_center_page.dart index 839fd181..a77944da 100644 --- a/lib/features/mine/user_center/presentation/learning_center_page.dart +++ b/lib/features/mine/user_center/presentation/learning_center_page.dart @@ -264,7 +264,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '加载中...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -333,7 +333,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( error, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -343,7 +343,7 @@ class _LearningCenterPageState extends ConsumerState { ref.read(learningProgressProvider.notifier).loadAll(), child: Text( '重试', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textOnAccent, fontWeight: FontWeight.w600, ), @@ -385,7 +385,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '今日目标', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -426,14 +426,14 @@ class _LearningCenterPageState extends ConsumerState { children: [ Text( '$percent%', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( '${state.todayProgress}/${state.dailyGoal}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -510,14 +510,14 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ); @@ -577,7 +577,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '7天趋势', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -615,7 +615,7 @@ class _LearningCenterPageState extends ConsumerState { meta: meta, child: Text( labels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -665,7 +665,7 @@ class _LearningCenterPageState extends ConsumerState { return touchedSpots.map((spot) { return LineTooltipItem( '${spot.y.toInt()}', - AppTypography.of(context).subhead.copyWith( + AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -751,7 +751,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '分类统计', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -773,7 +773,7 @@ class _LearningCenterPageState extends ConsumerState { if (groupIndex >= categories.length) return null; return BarTooltipItem( '${categories[groupIndex].name}: ${rod.toY.toInt()}', - AppTypography.of(context).subhead.copyWith( + AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -798,7 +798,7 @@ class _LearningCenterPageState extends ConsumerState { meta: meta, child: Text( categories[idx].name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -858,7 +858,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '目标设置', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -870,7 +870,7 @@ class _LearningCenterPageState extends ConsumerState { children: [ Text( '每日学习目标', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -886,7 +886,7 @@ class _LearningCenterPageState extends ConsumerState { ), child: Text( '${state.dailyGoal} 篇', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -912,11 +912,11 @@ class _LearningCenterPageState extends ConsumerState { children: [ Text( '5篇', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( '50篇', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -943,7 +943,7 @@ class _LearningCenterPageState extends ConsumerState { children: [ Text( '今日进度', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), if (isCompleted) @@ -958,7 +958,7 @@ class _LearningCenterPageState extends ConsumerState { const SizedBox(width: 4), Text( '已完成', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -968,7 +968,7 @@ class _LearningCenterPageState extends ConsumerState { else Text( '${state.todayProgress}/${state.dailyGoal}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -1135,7 +1135,7 @@ class _DashboardHero extends StatelessWidget { children: [ Text( currentTitle, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1143,7 +1143,7 @@ class _DashboardHero extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( '距下一头衔还需 ${nextThreshold - score} 积分', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -1260,14 +1260,14 @@ class _ProgressRing extends StatelessWidget { children: [ AnimatedCounter( value: score, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.accent, fontWeight: FontWeight.w800, ), ), Text( '积分', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -1350,7 +1350,7 @@ class _MiniStatRow extends StatelessWidget { const SizedBox(width: 4), Text( item.value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1358,7 +1358,7 @@ class _MiniStatRow extends StatelessWidget { const SizedBox(width: 2), Text( item.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -1399,14 +1399,14 @@ class _StatChip extends StatelessWidget { const SizedBox(height: 2), AnimatedCounter( value: value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ); @@ -1451,7 +1451,7 @@ class _DailyRecommendCards extends StatelessWidget { const SizedBox(width: 6), Text( '每日推荐', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1469,7 +1469,7 @@ class _DailyRecommendCards extends StatelessWidget { ), child: Text( '周$weekday', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -1638,7 +1638,7 @@ class _DailyCard extends StatelessWidget { Expanded( child: Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -1654,7 +1654,7 @@ class _DailyCard extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( primary, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1666,7 +1666,7 @@ class _DailyCard extends StatelessWidget { Expanded( child: Text( secondary, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.4, ), diff --git a/lib/features/mine/user_center/presentation/learning_progress_page.dart b/lib/features/mine/user_center/presentation/learning_progress_page.dart index 353be93a..2fb45c61 100644 --- a/lib/features/mine/user_center/presentation/learning_progress_page.dart +++ b/lib/features/mine/user_center/presentation/learning_progress_page.dart @@ -51,7 +51,7 @@ class _LearningProgressPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '📊 学习进度', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -77,7 +77,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '加载中...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -145,7 +145,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( error, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -154,7 +154,7 @@ class _LearningProgressPageState extends ConsumerState { onPressed: _refresh, child: Text( '重试', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -192,7 +192,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '今日目标', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -233,14 +233,14 @@ class _LearningProgressPageState extends ConsumerState { children: [ Text( '$percent%', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( '${state.todayProgress}/${state.dailyGoal}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -295,14 +295,14 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ); @@ -358,7 +358,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '7天趋势', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -396,7 +396,7 @@ class _LearningProgressPageState extends ConsumerState { meta: meta, child: Text( labels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -446,7 +446,7 @@ class _LearningProgressPageState extends ConsumerState { return touchedSpots.map((spot) { return LineTooltipItem( '${spot.y.toInt()}', - AppTypography.of(context).subhead.copyWith( + AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -528,7 +528,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '分类统计', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -550,7 +550,7 @@ class _LearningProgressPageState extends ConsumerState { if (groupIndex >= categories.length) return null; return BarTooltipItem( '${categories[groupIndex].name}: ${rod.toY.toInt()}', - AppTypography.of(context).subhead.copyWith( + AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -575,7 +575,7 @@ class _LearningProgressPageState extends ConsumerState { meta: meta, child: Text( categories[idx].name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -631,7 +631,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '目标设置', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -643,7 +643,7 @@ class _LearningProgressPageState extends ConsumerState { children: [ Text( '每日学习目标', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -659,7 +659,7 @@ class _LearningProgressPageState extends ConsumerState { ), child: Text( '${state.dailyGoal} 篇', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -685,11 +685,11 @@ class _LearningProgressPageState extends ConsumerState { children: [ Text( '5篇', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( '50篇', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -712,7 +712,7 @@ class _LearningProgressPageState extends ConsumerState { children: [ Text( '今日进度', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), if (isCompleted) @@ -727,7 +727,7 @@ class _LearningProgressPageState extends ConsumerState { const SizedBox(width: 4), Text( '已完成', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -737,7 +737,7 @@ class _LearningProgressPageState extends ConsumerState { else Text( '${state.todayProgress}/${state.dailyGoal}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/mine/user_center/presentation/my_devices_page.dart b/lib/features/mine/user_center/presentation/my_devices_page.dart index aaa0ed8f..d5f5d486 100644 --- a/lib/features/mine/user_center/presentation/my_devices_page.dart +++ b/lib/features/mine/user_center/presentation/my_devices_page.dart @@ -94,7 +94,7 @@ class _MyDevicesPageState extends ConsumerState { onPressed: () => _showOfflineAllDialog(context, ext), child: Text( '全部下线', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -216,7 +216,7 @@ class _MyDevicesPageState extends ConsumerState { child: CupertinoTextField( controller: controller, placeholder: '输入新名称', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.all(AppSpacing.md), decoration: BoxDecoration( color: ext.bgSecondary, @@ -360,12 +360,12 @@ class _MyDevicesPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无设备记录', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '登录后设备信息将自动记录', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -385,7 +385,7 @@ class _MyDevicesPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( error, - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -393,7 +393,7 @@ class _MyDevicesPageState extends ConsumerState { ref.read(deviceProvider.notifier).loadDevices(refresh: true), child: Text( '重试', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], diff --git a/lib/features/mine/user_center/presentation/public_profile_page.dart b/lib/features/mine/user_center/presentation/public_profile_page.dart index af117df9..f882458e 100644 --- a/lib/features/mine/user_center/presentation/public_profile_page.dart +++ b/lib/features/mine/user_center/presentation/public_profile_page.dart @@ -174,7 +174,7 @@ class _PublicProfilePageState extends ConsumerState { const Text('😕', style: TextStyle(fontSize: 48)), const SizedBox(height: AppSpacing.sm), Text('用户不存在', - style: AppTypography.of(context).body.copyWith(color: ext.textHint)), + style: AppTypography.body.copyWith(color: ext.textHint)), const SizedBox(height: AppSpacing.md), CupertinoButton( color: ext.accent, @@ -284,7 +284,7 @@ class _ParallaxHeader extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( displayName, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -310,7 +310,7 @@ class _ParallaxHeader extends StatelessWidget { const SizedBox(width: 4), Text( title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -452,11 +452,11 @@ class _AnimatedStat extends StatelessWidget { ), const SizedBox(height: 6), Text(value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700)), const SizedBox(height: 2), Text(label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary)), + style: AppTypography.caption2.copyWith(color: ext.textSecondary)), ], ); } @@ -487,7 +487,7 @@ class _InteractionButtons extends StatelessWidget { const Text('👋', style: TextStyle(fontSize: 14)), const SizedBox(width: 6), Text('关注', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textInverse, fontWeight: FontWeight.w600)), ], @@ -522,7 +522,7 @@ class _InteractionButtons extends StatelessWidget { const Text('💬', style: TextStyle(fontSize: 14)), const SizedBox(width: 6), Text('私信', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600)), ], @@ -554,7 +554,7 @@ class _InteractionButtons extends StatelessWidget { child: CupertinoButton( padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10), child: Text('⋯', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + style: AppTypography.headline.copyWith(color: ext.textPrimary)), onPressed: () { showCupertinoModalPopup( context: context, @@ -623,14 +623,14 @@ class _BioSection extends StatelessWidget { ), const SizedBox(width: AppSpacing.sm), Text('个人简介', - style: AppTypography.of(context).callout + style: AppTypography.callout .copyWith(color: ext.textSecondary)), ], ), const SizedBox(height: AppSpacing.sm), Text( bio, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6), ), ], @@ -676,7 +676,7 @@ class _TitleBadgeSection extends StatelessWidget { ), const SizedBox(width: AppSpacing.sm), Text('头衔等级', - style: AppTypography.of(context).callout + style: AppTypography.callout .copyWith(color: ext.textSecondary)), ], ), @@ -734,11 +734,11 @@ class _TitleBadgeSection extends StatelessWidget { Row( children: [ Text('当前积分', - style: AppTypography.of(context).caption1 + style: AppTypography.caption1 .copyWith(color: ext.textHint)), const Spacer(), Text('$score', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w700)), ], ), @@ -781,7 +781,7 @@ class _TitleBadge extends StatelessWidget { const SizedBox(width: 4), Text( name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? ext.accent : ext.textHint, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), @@ -832,7 +832,7 @@ class _ActivitySummary extends StatelessWidget { ), const SizedBox(width: AppSpacing.sm), Text('活跃数据', - style: AppTypography.of(context).callout + style: AppTypography.callout .copyWith(color: ext.textSecondary)), ], ), @@ -916,7 +916,7 @@ class _ActivityChip extends StatelessWidget { Text(emoji, style: const TextStyle(fontSize: 12)), const SizedBox(width: 4), Text(label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textPrimary, )), ], diff --git a/lib/features/mine/user_center/presentation/tag_cloud_page.dart b/lib/features/mine/user_center/presentation/tag_cloud_page.dart index 7730c12d..f13651c4 100644 --- a/lib/features/mine/user_center/presentation/tag_cloud_page.dart +++ b/lib/features/mine/user_center/presentation/tag_cloud_page.dart @@ -164,7 +164,7 @@ class _TagCloudPageState extends ConsumerState { builder: (ctx) => CupertinoActionSheet( title: Text( '🏷️ ${tag.name}', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), actions: [ CupertinoActionSheetAction( @@ -253,14 +253,14 @@ class _TagCloudPageState extends ConsumerState { const SizedBox(width: 6), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: AppTheme.ext(context).textSecondary, ), ), const Spacer(), Text( value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: AppTheme.ext(context).textPrimary, fontWeight: FontWeight.w600, ), @@ -280,7 +280,7 @@ class _TagCloudPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '🏷️ 标签云', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -352,7 +352,7 @@ class _TagCloudPageState extends ConsumerState { child: Center( child: Text( initial, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? CupertinoColors.white : isActive @@ -380,7 +380,7 @@ class _TagCloudPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '加载标签中...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -396,7 +396,7 @@ class _TagCloudPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( state.error!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -421,12 +421,12 @@ class _TagCloudPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( state.filterInitial.isNotEmpty ? '该字母下暂无标签' : '暂无标签', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( state.filterInitial.isNotEmpty ? '试试其他字母或清除筛选' : '点击右上角 + 添加第一个标签', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), if (state.filterInitial.isNotEmpty) ...[ const SizedBox(height: AppSpacing.md), @@ -437,7 +437,7 @@ class _TagCloudPageState extends ConsumerState { ref.read(tagCloudProvider.notifier).filterByInitial(''), child: Text( '清除筛选', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -474,7 +474,7 @@ class _TagCloudPageState extends ConsumerState { const SizedBox(width: 4), Text( '${tags.length} 个标签', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -492,7 +492,7 @@ class _TagCloudPageState extends ConsumerState { ), child: Text( '筛选: ${state.filterInitial}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/user_center/presentation/user_center_page.dart b/lib/features/mine/user_center/presentation/user_center_page.dart index 47ea3036..62d10467 100644 --- a/lib/features/mine/user_center/presentation/user_center_page.dart +++ b/lib/features/mine/user_center/presentation/user_center_page.dart @@ -130,7 +130,7 @@ class _UserCenterPageState extends ConsumerState { builder: (ctx) => CupertinoActionSheet( title: Text( '修改头像', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( @@ -196,7 +196,7 @@ class _UserCenterPageState extends ConsumerState { const SizedBox(height: 6), Text( 'URL长度不能超过2048个字符,仅支持 http/https 开头的图片链接', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: dialogExt.textHint, ), ), @@ -252,7 +252,7 @@ class _UserCenterPageState extends ConsumerState { padding: const EdgeInsets.only(top: 8), child: Text( '正在审核头像图片,请稍候...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), textAlign: TextAlign.center, @@ -322,7 +322,7 @@ class _UserCenterPageState extends ConsumerState { navigationBar: CupertinoNavigationBar( middle: Text( '个人中心', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -354,7 +354,7 @@ class _UserCenterPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '加载中...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -457,12 +457,12 @@ class _UserCenterPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '请先登录', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '登录后查看个人中心', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -471,7 +471,7 @@ class _UserCenterPageState extends ConsumerState { onPressed: () => context.appPush(AppRoutes.login), child: Text( '去登录', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), diff --git a/lib/features/mine/user_center/presentation/user_debug_page.dart b/lib/features/mine/user_center/presentation/user_debug_page.dart index bbaa2ff7..58fcfbbf 100644 --- a/lib/features/mine/user_center/presentation/user_debug_page.dart +++ b/lib/features/mine/user_center/presentation/user_debug_page.dart @@ -101,7 +101,7 @@ class _UserDebugPageState extends ConsumerState { const SizedBox(width: 6), Text( '调试信息', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -137,12 +137,12 @@ class _UserDebugPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '加载失败', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.xs), Text( _error!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), textAlign: TextAlign.center, @@ -216,7 +216,7 @@ class _UserDebugPageState extends ConsumerState { child: Center( child: Text( tab.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w700 @@ -362,7 +362,7 @@ class _UserDebugPageState extends ConsumerState { Expanded( child: Text( title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -384,7 +384,7 @@ class _UserDebugPageState extends ConsumerState { ), child: Text( endpoint, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontFamily: 'monospace', ), @@ -399,7 +399,7 @@ class _UserDebugPageState extends ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '暂无数据', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ), ], @@ -434,7 +434,7 @@ class _UserDebugPageState extends ConsumerState { width: 110, child: Text( entry.key, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, fontFamily: 'monospace', @@ -453,7 +453,7 @@ class _UserDebugPageState extends ConsumerState { ), child: Text( displayValue, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: 'monospace', height: 1.4, @@ -462,7 +462,7 @@ class _UserDebugPageState extends ConsumerState { ) : Text( displayValue, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -495,7 +495,7 @@ class _UserDebugPageState extends ConsumerState { const SizedBox(width: 6), Text( '可编辑字段总览', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -516,7 +516,7 @@ class _UserDebugPageState extends ConsumerState { ), child: Text( 'POST /api/user_center/profile', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGreen, fontFamily: 'monospace', ), @@ -560,7 +560,7 @@ class _UserDebugPageState extends ConsumerState { ), child: Text( '安全接口 /api/user_security/* (需回执验证)', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemOrange, fontFamily: 'monospace', ), @@ -608,7 +608,7 @@ class _UserDebugPageState extends ConsumerState { Expanded( child: Text( '回执(Receipt)验证: HMAC-SHA256签名,密钥Xy7kP9mL2qR4wS8v,有效期300秒', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemBlue, ), ), @@ -650,7 +650,7 @@ class _UserDebugPageState extends ConsumerState { children: [ Text( field, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isProfile ? CupertinoColors.systemGreen : CupertinoColors.systemOrange, @@ -674,7 +674,7 @@ class _UserDebugPageState extends ConsumerState { ), child: Text( apiType, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isProfile ? CupertinoColors.systemGreen : CupertinoColors.systemOrange, @@ -693,14 +693,14 @@ class _UserDebugPageState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( desc, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/mine/user_center/presentation/widgets/account_insights_sheet.dart b/lib/features/mine/user_center/presentation/widgets/account_insights_sheet.dart index b4510ff6..ecd78bb4 100644 --- a/lib/features/mine/user_center/presentation/widgets/account_insights_sheet.dart +++ b/lib/features/mine/user_center/presentation/widgets/account_insights_sheet.dart @@ -92,7 +92,7 @@ class _AccountInsightsSheetContentState children: [ Text( '🛡️ 账户洞察', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const Spacer(), if (state.unreadCount > 0) @@ -105,7 +105,7 @@ class _AccountInsightsSheetContentState onPressed: _markAllRead, child: Text( '全部已读', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -117,7 +117,7 @@ class _AccountInsightsSheetContentState onPressed: () => Navigator.pop(context), child: Text( '关闭', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], @@ -157,12 +157,12 @@ class _AccountInsightsSheetContentState const SizedBox(height: AppSpacing.md), Text( '一切正常', - style: AppTypography.of(context).headline.copyWith(color: ext.textSecondary), + style: AppTypography.headline.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( '暂无需要关注的账户安全事项', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -187,14 +187,14 @@ class _AccountInsightsSheetContentState children: [ Text( '共 ${state.activeInsights.length} 条 · ${state.unreadCount} 条未读', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const Spacer(), GestureDetector( onTap: _refresh, child: Text( '🔄 刷新', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ], @@ -219,7 +219,7 @@ class _AccountInsightsSheetContentState padding: const EdgeInsets.only(top: 8), child: Text( '选择后续提醒方式,或取消保持原状态', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), actions: [ @@ -384,7 +384,7 @@ class _InsightCard extends StatelessWidget { children: [ Text( insight.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -394,7 +394,7 @@ class _InsightCard extends StatelessWidget { const SizedBox(height: 2), Text( insight.description, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -415,12 +415,12 @@ class _InsightCard extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( _timeAgo(insight.createdAt), - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: AppSpacing.sm), Text( '· ${insight.expiresInLabel}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -492,7 +492,7 @@ class _PriorityTag extends StatelessWidget { : priority == InsightPriority.medium ? '中优先' : '低优先', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: textColor, fontWeight: FontWeight.w500, ), @@ -532,7 +532,7 @@ class _ActionChip extends StatelessWidget { ), child: Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isPrimary ? CupertinoColors.white : ext.textSecondary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/mine/user_center/presentation/widgets/account_section.dart b/lib/features/mine/user_center/presentation/widgets/account_section.dart index a510c8e4..56332e6a 100644 --- a/lib/features/mine/user_center/presentation/widgets/account_section.dart +++ b/lib/features/mine/user_center/presentation/widgets/account_section.dart @@ -53,7 +53,7 @@ class AccountSection extends StatelessWidget { const SizedBox(width: 4), Text( '账户与数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -125,7 +125,7 @@ class DebugSection extends StatelessWidget { ), child: Text( 'DEV', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w700, ), @@ -174,7 +174,7 @@ class AppInfoFooter extends StatelessWidget { const SizedBox(width: 6), Text( AppConstants.appName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -193,14 +193,14 @@ class AppInfoFooter extends StatelessWidget { : '${AppConstants.buildNumber}'; return Text( 'v$version ($buildNum)', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ); }, ), const SizedBox(height: AppSpacing.xs), Text( AppConstants.appDescription, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, height: 1.4, ), @@ -209,7 +209,7 @@ class AppInfoFooter extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( '© ${DateTime.now().year} ${AppConstants.appNameEn}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint.withValues(alpha: 0.6), ), ), @@ -254,7 +254,7 @@ class SettingRow extends StatelessWidget { Expanded( child: Text( title, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), if (trailing != null) trailing!, diff --git a/lib/features/mine/user_center/presentation/widgets/edit_field_bottom_sheet.dart b/lib/features/mine/user_center/presentation/widgets/edit_field_bottom_sheet.dart index ac5e89ee..9314a577 100644 --- a/lib/features/mine/user_center/presentation/widgets/edit_field_bottom_sheet.dart +++ b/lib/features/mine/user_center/presentation/widgets/edit_field_bottom_sheet.dart @@ -87,14 +87,14 @@ class _EditFieldBottomSheetState extends ConsumerState { onPressed: () => Navigator.pop(context), child: Text( '取消', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), ), Text( '修改${widget.title}', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -106,7 +106,7 @@ class _EditFieldBottomSheetState extends ConsumerState { ? CupertinoActivityIndicator(color: ext.accent) : Text( '保存', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -126,7 +126,7 @@ class _EditFieldBottomSheetState extends ConsumerState { borderRadius: AppRadius.mdBorder, ), padding: const EdgeInsets.all(AppSpacing.md), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), autofocus: true, ), const SizedBox(height: AppSpacing.lg), diff --git a/lib/features/mine/user_center/presentation/widgets/editable_info_section.dart b/lib/features/mine/user_center/presentation/widgets/editable_info_section.dart index 43ca8f88..2b8e95aa 100644 --- a/lib/features/mine/user_center/presentation/widgets/editable_info_section.dart +++ b/lib/features/mine/user_center/presentation/widgets/editable_info_section.dart @@ -59,7 +59,7 @@ class EditableInfoSection extends ConsumerWidget { const SizedBox(width: 4), Text( '个人信息', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -192,14 +192,14 @@ class InfoRow extends StatelessWidget { width: 56, child: Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), const SizedBox(width: AppSpacing.sm), Expanded( child: Text( value, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), maxLines: maxLines, overflow: TextOverflow.ellipsis, textAlign: TextAlign.right, @@ -224,7 +224,7 @@ class InfoRow extends StatelessWidget { ), child: Text( apiHint!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: apiHint == 'profile' ? CupertinoColors.systemGreen : CupertinoColors.systemOrange, diff --git a/lib/features/mine/user_center/presentation/widgets/learning_charts.dart b/lib/features/mine/user_center/presentation/widgets/learning_charts.dart index 9bb396c2..f4713d48 100644 --- a/lib/features/mine/user_center/presentation/widgets/learning_charts.dart +++ b/lib/features/mine/user_center/presentation/widgets/learning_charts.dart @@ -51,7 +51,7 @@ class WeeklyTrendChart extends StatelessWidget { children: [ Text( '📈 7日趋势', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -67,7 +67,7 @@ class WeeklyTrendChart extends StatelessWidget { ), child: Text( '近7天', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -96,7 +96,7 @@ class WeeklyTrendChart extends StatelessWidget { interval: _calculateInterval(spots), getTitlesWidget: (value, meta) => Text( '${value.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -113,7 +113,7 @@ class WeeklyTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -158,7 +158,7 @@ class WeeklyTrendChart extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()} 次', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: ext.textInverse, fontWeight: FontWeight.w600, ), @@ -318,7 +318,7 @@ class LearningStatsGrid extends StatelessWidget { ), child: Text( '📊 学习统计', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -394,7 +394,7 @@ class _StatGridCard extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '${item.value}', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w800, ), @@ -402,7 +402,7 @@ class _StatGridCard extends StatelessWidget { const SizedBox(height: 2), Text( item.label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/mine/user_center/presentation/widgets/learning_heatmap.dart b/lib/features/mine/user_center/presentation/widgets/learning_heatmap.dart index 78ad536e..10a43730 100644 --- a/lib/features/mine/user_center/presentation/widgets/learning_heatmap.dart +++ b/lib/features/mine/user_center/presentation/widgets/learning_heatmap.dart @@ -53,7 +53,7 @@ class LearningHeatmap extends StatelessWidget { children: [ Text( '🔥 学习热力图', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -134,7 +134,7 @@ class _YearSelector extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 6), child: Text( '$y', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, ), ), @@ -178,7 +178,7 @@ class _StreakBadge extends StatelessWidget { const SizedBox(width: 4), Text( '$value', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -186,7 +186,7 @@ class _StreakBadge extends StatelessWidget { const SizedBox(width: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), @@ -281,7 +281,7 @@ class _HeatmapGrid extends StatelessWidget { left: ms.weekIndex * _cellStep, child: Text( ms.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -351,7 +351,7 @@ class _HeatmapGrid extends StatelessWidget { child: text.isNotEmpty ? Text( text, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 9, ), @@ -469,7 +469,7 @@ class _HeatmapLegend extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - Text('少', style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text('少', style: AppTypography.caption2.copyWith(color: ext.textHint)), const SizedBox(width: 4), ...[0.0, 0.3, 0.5, 0.7, 1.0].map( (alpha) => Container( @@ -485,7 +485,7 @@ class _HeatmapLegend extends StatelessWidget { ), ), const SizedBox(width: 4), - Text('多', style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text('多', style: AppTypography.caption2.copyWith(color: ext.textHint)), ], ); } diff --git a/lib/features/mine/user_center/presentation/widgets/profile_header_row.dart b/lib/features/mine/user_center/presentation/widgets/profile_header_row.dart index 84a21861..8dc69fed 100644 --- a/lib/features/mine/user_center/presentation/widgets/profile_header_row.dart +++ b/lib/features/mine/user_center/presentation/widgets/profile_header_row.dart @@ -102,7 +102,7 @@ class ProfileHeaderRow extends StatelessWidget { Flexible( child: Text( user.displayName, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -126,7 +126,7 @@ class ProfileHeaderRow extends StatelessWidget { const SizedBox(width: 3), Text( getLevelBadge(user.level), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: levelColor, fontWeight: FontWeight.w600, ), @@ -139,7 +139,7 @@ class ProfileHeaderRow extends StatelessWidget { const SizedBox(height: 4), Text( user.bio.isNotEmpty ? user.bio : '用文字点亮生活的每一刻', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -164,7 +164,7 @@ class ProfileHeaderRow extends StatelessWidget { const SizedBox(width: 4), Text( '编辑', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -180,7 +180,7 @@ class ProfileHeaderRow extends StatelessWidget { builder: (ctx) => CupertinoActionSheet( title: Text( '编辑资料', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), actions: [ CupertinoActionSheetAction( diff --git a/lib/features/mine/user_center/presentation/widgets/quick_action_grid.dart b/lib/features/mine/user_center/presentation/widgets/quick_action_grid.dart index a1edc4bf..a84a679d 100644 --- a/lib/features/mine/user_center/presentation/widgets/quick_action_grid.dart +++ b/lib/features/mine/user_center/presentation/widgets/quick_action_grid.dart @@ -183,7 +183,7 @@ class _QuickActionCard extends StatelessWidget { const SizedBox(height: 6), Text( action.title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/mine/user_center/presentation/widgets/user_stats_bar.dart b/lib/features/mine/user_center/presentation/widgets/user_stats_bar.dart index dc49cb44..6b89823a 100644 --- a/lib/features/mine/user_center/presentation/widgets/user_stats_bar.dart +++ b/lib/features/mine/user_center/presentation/widgets/user_stats_bar.dart @@ -116,14 +116,14 @@ class UserStatsBar extends ConsumerWidget { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), textAlign: TextAlign.center, ), ], diff --git a/lib/features/note/presentation/note_edit_page.dart b/lib/features/note/presentation/note_edit_page.dart index d371e7fd..b25bba60 100644 --- a/lib/features/note/presentation/note_edit_page.dart +++ b/lib/features/note/presentation/note_edit_page.dart @@ -329,7 +329,7 @@ class _NoteEditPageState extends ConsumerState const SizedBox(width: 4), Text( '$_charCount 字', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const Spacer(), if (_lastSaveTime != null) ...[ @@ -341,7 +341,7 @@ class _NoteEditPageState extends ConsumerState const SizedBox(width: 3), Text( _lastSaveTime!, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ] else if (_hasUnsavedChanges) ...[ Container( @@ -355,7 +355,7 @@ class _NoteEditPageState extends ConsumerState const SizedBox(width: 4), Text( '未保存', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemOrange, ), ), @@ -368,7 +368,7 @@ class _NoteEditPageState extends ConsumerState const SizedBox(width: 3), Text( '已保存', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], if (_isSaving) ...[ @@ -399,10 +399,10 @@ class _NoteEditPageState extends ConsumerState child: CupertinoTextField( controller: _titleController, placeholder: '标题(选填,留空自动命名)', - placeholderStyle: AppTypography.of(context).headline.copyWith( + placeholderStyle: AppTypography.headline.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), decoration: null, padding: const EdgeInsets.all(AppSpacing.md), maxLength: 100, @@ -421,10 +421,10 @@ class _NoteEditPageState extends ConsumerState controller: _contentController, focusNode: _contentFocusNode, placeholder: _getContentPlaceholder(), - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: null, padding: const EdgeInsets.all(AppSpacing.md), maxLines: null, @@ -466,7 +466,7 @@ class _NoteEditPageState extends ConsumerState child: Text( entry.value, textAlign: TextAlign.center, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 : FontWeight.w400, ), @@ -494,7 +494,7 @@ class _NoteEditPageState extends ConsumerState width: 60, child: Text( '📂 分类', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -503,10 +503,10 @@ class _NoteEditPageState extends ConsumerState child: CupertinoTextField( controller: _categoryController, placeholder: '选填', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), decoration: null, padding: EdgeInsets.zero, ), @@ -520,7 +520,7 @@ class _NoteEditPageState extends ConsumerState width: 60, child: Text( '📖 来源', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -537,7 +537,7 @@ class _NoteEditPageState extends ConsumerState orElse: () => _sourceTypes.first, ) .value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _sourceType.isEmpty ? ext.textHint : ext.textPrimary, @@ -555,7 +555,7 @@ class _NoteEditPageState extends ConsumerState width: 60, child: Text( '🌐 公开', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -574,7 +574,7 @@ class _NoteEditPageState extends ConsumerState const SizedBox(width: 8), Text( _isPublic == 1 ? '所有人可见' : '仅自己可见', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -609,7 +609,7 @@ class _NoteEditPageState extends ConsumerState ), ), const SizedBox(height: 8), - Text('📖 选择来源类型', style: AppTypography.of(context).headline), + Text('📖 选择来源类型', style: AppTypography.headline), const SizedBox(height: 8), Expanded( child: CupertinoPicker( @@ -625,7 +625,7 @@ class _NoteEditPageState extends ConsumerState }, children: _sourceTypes.map((e) { return Center( - child: Text(e.value, style: AppTypography.of(context).body), + child: Text(e.value, style: AppTypography.body), ); }).toList(), ), @@ -660,12 +660,12 @@ class _NoteEditPageState extends ConsumerState const SizedBox(height: AppSpacing.md), Text( '暂无内容预览', - style: AppTypography.of(context).headline.copyWith(color: ext.textSecondary), + style: AppTypography.headline.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '切换到编辑模式开始书写', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -681,7 +681,7 @@ class _NoteEditPageState extends ConsumerState Text( title, style: _getPreviewFont( - AppTypography.of(context).display.copyWith( + AppTypography.display.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -722,7 +722,7 @@ class _NoteEditPageState extends ConsumerState ), ), const SizedBox(height: 8), - Text('🔤 选择预览字体', style: AppTypography.of(context).headline), + Text('🔤 选择预览字体', style: AppTypography.headline), const SizedBox(height: 8), Expanded( child: CupertinoPicker( @@ -736,7 +736,7 @@ class _NoteEditPageState extends ConsumerState child: Text( f, style: f == '系统默认' - ? AppTypography.of(context).body + ? AppTypography.body : _tryGoogleFont(f), ), ); @@ -751,9 +751,9 @@ class _NoteEditPageState extends ConsumerState TextStyle _tryGoogleFont(String family) { try { - return GoogleFonts.getFont(family, textStyle: AppTypography.of(context).body); + return GoogleFonts.getFont(family, textStyle: AppTypography.body); } catch (_) { - return AppTypography.of(context).body; + return AppTypography.body; } } diff --git a/lib/features/note/presentation/note_list_page.dart b/lib/features/note/presentation/note_list_page.dart index 2cb5032e..9e941cf3 100644 --- a/lib/features/note/presentation/note_list_page.dart +++ b/lib/features/note/presentation/note_list_page.dart @@ -254,7 +254,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: 16), Text( '🎨 切换布局风格', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: 16), SizedBox( @@ -281,7 +281,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 6), Text( '列表', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _layout == NoteLayout.list ? ext.accent : ext.textSecondary, @@ -311,7 +311,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 6), Text( '瀑布流', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _layout == NoteLayout.grid ? ext.accent : ext.textSecondary, @@ -341,7 +341,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 6), Text( '时间线', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _layout == NoteLayout.timeline ? ext.accent : ext.textSecondary, @@ -453,7 +453,7 @@ class _NoteListPageState extends ConsumerState { Expanded( child: Text( note.title.isNotEmpty ? note.title : '无标题', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -481,7 +481,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: 6), Text( note.preview, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), maxLines: 3, @@ -551,7 +551,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: 6), Text( note.title.isNotEmpty ? note.title : '无标题', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -569,7 +569,7 @@ class _NoteListPageState extends ConsumerState { Expanded( child: Text( note.preview, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 5, @@ -632,7 +632,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 8), Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -689,7 +689,7 @@ class _NoteListPageState extends ConsumerState { Expanded( child: Text( note.title.isNotEmpty ? note.title : '无标题', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -709,7 +709,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: 6), Text( note.preview, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), maxLines: 3, @@ -755,7 +755,7 @@ class _NoteListPageState extends ConsumerState { ), child: Text( compact ? emoji : '$emoji $label', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color, fontWeight: FontWeight.w600, fontSize: compact ? 11 : null, @@ -783,7 +783,7 @@ class _NoteListPageState extends ConsumerState { Flexible( child: Text( '摘自: ${_getTargetLabel(note.sourceType)}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: const Color(0xFFFF9500), fontSize: compact ? 10 : null, ), @@ -838,7 +838,7 @@ class _NoteListPageState extends ConsumerState { Expanded( child: Text( item.value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: item.key ? ext.textHint : ext.textSecondary, decoration: item.key ? TextDecoration.lineThrough : null, ), @@ -858,7 +858,7 @@ class _NoteListPageState extends ConsumerState { NoteModel note, { bool compact = false, }) { - final style = AppTypography.of(context).caption2.copyWith( + final style = AppTypography.caption2.copyWith( color: ext.textHint, fontSize: compact ? 10 : null, ); @@ -933,7 +933,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 12), Text( '到底了', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const SizedBox(width: 12), Container( @@ -962,7 +962,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: 6), Text( '$count / $limit', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isNearLimit ? CupertinoColors.systemRed : ext.textHint, @@ -1005,12 +1005,12 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '请先登录', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '登录后即可使用笔记功能', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -1026,12 +1026,12 @@ class _NoteListPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无笔记', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '点击右上角 + 开始记录', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -1070,7 +1070,7 @@ class _NoteListPageState extends ConsumerState { child: Center( child: Text( entry.value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -1099,7 +1099,7 @@ class _NoteListPageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( dateLabel, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -1107,7 +1107,7 @@ class _NoteListPageState extends ConsumerState { const Spacer(), Text( '$count 篇', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/onboarding/presentation/onboarding_page.dart b/lib/features/onboarding/presentation/onboarding_page.dart index 36193167..85a78da9 100644 --- a/lib/features/onboarding/presentation/onboarding_page.dart +++ b/lib/features/onboarding/presentation/onboarding_page.dart @@ -176,7 +176,6 @@ class _OnboardingPageState extends ConsumerState { AppBarCharacterSprite( characterId: 'cat', expression: _expressionForPage(state.currentPage), - size: 48.0, ), Container( width: 36, @@ -207,11 +206,7 @@ class _OnboardingPageState extends ConsumerState { controller: _pageController, physics: const ClampingScrollPhysics(), onPageChanged: _onPageChanged, - children: const [ - WelcomePage(), - AgreementPage(), - PersonalizationPage(), - ], + children: const [WelcomePage(), AgreementPage(), PersonalizationPage()], ), ); @@ -221,13 +216,7 @@ class _OnboardingPageState extends ConsumerState { ); if (isLandscape) { - return Column( - children: [ - _buildTopBar(ext, state), - pageView, - stepDots, - ], - ); + return Column(children: [_buildTopBar(ext, state), pageView, stepDots]); } return Column( @@ -260,7 +249,7 @@ class _OnboardingPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '闲言', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -268,7 +257,7 @@ class _OnboardingPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '文字阅读更纯粹', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/onboarding/presentation/pages/agreement_page.dart b/lib/features/onboarding/presentation/pages/agreement_page.dart index 468be7f1..ab1d032d 100644 --- a/lib/features/onboarding/presentation/pages/agreement_page.dart +++ b/lib/features/onboarding/presentation/pages/agreement_page.dart @@ -160,7 +160,7 @@ class _AgreementPageState extends ConsumerState { children: [ Text( '软件协议', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -169,7 +169,7 @@ class _AgreementPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '请阅读并同意以下协议,保障您的权益', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), textAlign: TextAlign.end, ), ], @@ -209,7 +209,7 @@ class _AgreementPageState extends ConsumerState { ), child: Text( OnboardingConstants.agreementTabs[i], - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, ), @@ -283,7 +283,7 @@ class _AgreementPageState extends ConsumerState { alignment: Alignment.center, child: Text( chapters[index].shortTitle, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, ), @@ -317,14 +317,14 @@ class _AgreementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( agreementType.title, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), const SizedBox(height: AppSpacing.xs), Text( '更新日期:$updateDate', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.sm), Container( @@ -364,7 +364,7 @@ class _AgreementPageState extends ConsumerState { Expanded( child: Text( trimmed, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -383,7 +383,7 @@ class _AgreementPageState extends ConsumerState { children: [ Text( ' • ', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -391,7 +391,7 @@ class _AgreementPageState extends ConsumerState { Expanded( child: Text( trimmed.replaceFirst(RegExp(r'^[•\-\s]+'), ''), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -407,7 +407,7 @@ class _AgreementPageState extends ConsumerState { padding: const EdgeInsets.symmetric(vertical: 2), child: Text( trimmed, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontFamily: 'Courier', height: 1.4, @@ -421,7 +421,7 @@ class _AgreementPageState extends ConsumerState { padding: const EdgeInsets.only(left: AppSpacing.sm, bottom: 2), child: Text( trimmed, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -435,7 +435,7 @@ class _AgreementPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: 4), child: Text( trimmed.replaceAll('**', ''), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: isBold ? ext.textPrimary : ext.textSecondary, fontWeight: isBold ? FontWeight.w600 : FontWeight.normal, height: 1.6, @@ -482,7 +482,7 @@ class _AgreementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '软件权限使用说明', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -491,7 +491,7 @@ class _AgreementPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '以下权限仅在您使用相关功能时请求', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.sm), Container( @@ -534,7 +534,7 @@ class _AgreementPageState extends ConsumerState { const SizedBox(width: 6), Text( group.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: color, fontWeight: FontWeight.w600, ), @@ -543,21 +543,21 @@ class _AgreementPageState extends ConsumerState { if (group == PermissionGroup.required) Text( '⚠️ 拒绝将影响核心功能', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color.withValues(alpha: 0.7), ), ) else if (group == PermissionGroup.optional) Text( '可按需授权', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color.withValues(alpha: 0.7), ), ) else Text( '系统级自动管理', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color.withValues(alpha: 0.7), ), ), @@ -590,7 +590,7 @@ class _AgreementPageState extends ConsumerState { children: [ Text( perm.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -608,7 +608,7 @@ class _AgreementPageState extends ConsumerState { ), child: Text( '必要', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: const Color(0xFFFF3B30), fontWeight: FontWeight.w600, ), @@ -628,7 +628,7 @@ class _AgreementPageState extends ConsumerState { ), child: Text( '系统级', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -640,7 +640,7 @@ class _AgreementPageState extends ConsumerState { const SizedBox(height: 2), Text( perm.description, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, height: 1.4, ), @@ -709,7 +709,7 @@ class _AgreementPageState extends ConsumerState { Expanded( child: Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ), ], @@ -735,7 +735,7 @@ class _AgreementPageState extends ConsumerState { : null, child: Text( '同意并继续', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: enabled ? ext.textOnAccent : ext.textDisabled, ), ), @@ -771,7 +771,7 @@ class _AgreementPageState extends ConsumerState { : null, child: Text( '跳过引导', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: enabled ? ext.textHint : ext.textDisabled, ), ), diff --git a/lib/features/onboarding/presentation/pages/personalization_page.dart b/lib/features/onboarding/presentation/pages/personalization_page.dart index 24273da8..cf379c81 100644 --- a/lib/features/onboarding/presentation/pages/personalization_page.dart +++ b/lib/features/onboarding/presentation/pages/personalization_page.dart @@ -147,7 +147,7 @@ class _PersonalizationPageState extends ConsumerState { children: [ Text( '个性化设置', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -156,7 +156,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '打造专属于你的阅读体验,稍后可随时调整', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), textAlign: TextAlign.end, ), ], @@ -192,7 +192,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '实时预览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -201,7 +201,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '山有木兮木有枝,心悦君兮君不知', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontSize: AppTypography.fontTitle3 * fontSizeScale, ), @@ -209,7 +209,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '—— 越人歌', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontSize: AppTypography.fontSubhead * fontSizeScale, ), @@ -243,7 +243,7 @@ class _PersonalizationPageState extends ConsumerState { ), child: Text( text, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ); } @@ -265,7 +265,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '外观', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -295,7 +295,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '功能', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), ], ), @@ -369,7 +369,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '主题模式', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), Row( @@ -404,7 +404,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: 2), Text( mode.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isSelected ? ext.accent : ext.textHint, ), ), @@ -430,7 +430,7 @@ class _PersonalizationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '强调色', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), Row( @@ -486,7 +486,7 @@ class _PersonalizationPageState extends ConsumerState { Expanded( child: Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ), CupertinoSwitch( @@ -524,7 +524,7 @@ class _PersonalizationPageState extends ConsumerState { ? const CupertinoActivityIndicator(color: CupertinoColors.white) : Text( '完成设置,进入闲言', - style: AppTypography.of(context).headline.copyWith(color: ext.textOnAccent), + style: AppTypography.headline.copyWith(color: ext.textOnAccent), ), ), ); diff --git a/lib/features/onboarding/presentation/pages/welcome_page.dart b/lib/features/onboarding/presentation/pages/welcome_page.dart index de6953f6..8305d923 100644 --- a/lib/features/onboarding/presentation/pages/welcome_page.dart +++ b/lib/features/onboarding/presentation/pages/welcome_page.dart @@ -43,10 +43,22 @@ class WelcomePage extends ConsumerWidget { child: isLandscape ? SingleChildScrollView( child: _buildContent( - ext, ref, context, state, isWide, isLandscape), + ext, + ref, + context, + state, + isWide, + isLandscape, + ), ) : _buildContent( - ext, ref, context, state, isWide, isLandscape), + ext, + ref, + context, + state, + isWide, + isLandscape, + ), ), ), ); @@ -70,12 +82,12 @@ class WelcomePage extends ConsumerWidget { _buildTitle(ext), SizedBox(height: spacing), _buildFeatureList(ext, context, isWide), - SizedBox(height: AppSpacing.sm), + const SizedBox(height: AppSpacing.sm), _buildPermissionEntry(ext, context), - SizedBox(height: AppSpacing.sm), + const SizedBox(height: AppSpacing.sm), _buildLocaleChips(ext, ref, state), if (!isLandscape) const Spacer(), - if (isLandscape) SizedBox(height: AppSpacing.sm), + if (isLandscape) const SizedBox(height: AppSpacing.sm), _buildBottomActions(ext, ref, context), SizedBox(height: isLandscape ? AppSpacing.sm : AppSpacing.xl), ], @@ -97,7 +109,7 @@ class WelcomePage extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '欢迎使用闲言', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -108,7 +120,7 @@ class WelcomePage extends ConsumerWidget { const SizedBox(height: AppSpacing.xs), Text( '文字阅读更纯粹 · 句子阅读 + 壁纸制作', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), textAlign: TextAlign.end, ), ], @@ -131,7 +143,8 @@ class WelcomePage extends ConsumerWidget { children: features.map((feature) { final isScan = feature['name'] == '扫一扫'; return SizedBox( - width: (MediaQuery.sizeOf(context).width.clamp(0, 600) - + width: + (MediaQuery.sizeOf(context).width.clamp(0, 600) - padding * 2 - spacing) / 2, @@ -185,10 +198,7 @@ class WelcomePage extends ConsumerWidget { OnboardingConstants.featureSvgPath(feature['icon']!), width: 20, height: 20, - colorFilter: ColorFilter.mode( - ext.accent, - BlendMode.srcIn, - ), + colorFilter: ColorFilter.mode(ext.accent, BlendMode.srcIn), ), ), ), @@ -199,14 +209,14 @@ class WelcomePage extends ConsumerWidget { children: [ Text( feature['name']!, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), const SizedBox(height: 2), Text( feature['desc']!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -242,7 +252,7 @@ class WelcomePage extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '了解软件权限', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -265,7 +275,7 @@ class WelcomePage extends ConsumerWidget { children: [ Text( '🌐 语言 / Language', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Wrap( @@ -297,7 +307,7 @@ class WelcomePage extends ConsumerWidget { ), child: Text( locale['name']!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -328,7 +338,7 @@ class WelcomePage extends ConsumerWidget { }, child: Text( '开始使用', - style: AppTypography.of(context).headline.copyWith(color: ext.textOnAccent), + style: AppTypography.headline.copyWith(color: ext.textOnAccent), ), ), ); diff --git a/lib/features/onboarding/presentation/widgets/page_nav_header.dart b/lib/features/onboarding/presentation/widgets/page_nav_header.dart index 47d8486c..71f6dc54 100644 --- a/lib/features/onboarding/presentation/widgets/page_nav_header.dart +++ b/lib/features/onboarding/presentation/widgets/page_nav_header.dart @@ -58,7 +58,7 @@ class PageNavHeader extends StatelessWidget { const SizedBox(width: 2), Text( previousLabel!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), diff --git a/lib/features/poetry/presentation/poetry_page.dart b/lib/features/poetry/presentation/poetry_page.dart index 2f6ff80d..7ef5a481 100644 --- a/lib/features/poetry/presentation/poetry_page.dart +++ b/lib/features/poetry/presentation/poetry_page.dart @@ -209,7 +209,7 @@ class _PoetryPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '📜 今日诗词', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -289,7 +289,7 @@ class _PoetryPageState extends ConsumerState { const SizedBox(width: 6), Text( '正在更新...', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -327,7 +327,7 @@ class _PoetryPageState extends ConsumerState { child: Center( child: Text( msg.content, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ).animate().fadeIn(duration: 300.ms, delay: delay); @@ -365,7 +365,7 @@ class _PoetryPageState extends ConsumerState { children: [ Text( poetry.content.cleanHtml, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, height: 2, ), @@ -377,7 +377,7 @@ class _PoetryPageState extends ConsumerState { if (poetry.title.isNotEmpty || poetry.authorLabel.isNotEmpty) Text( '《${poetry.title}》${poetry.authorLabel}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), textAlign: TextAlign.center, @@ -395,7 +395,7 @@ class _PoetryPageState extends ConsumerState { ), child: Text( '💡 ${poetry.recommendedReason}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, ), ), @@ -452,7 +452,7 @@ class _PoetryPageState extends ConsumerState { ), child: Text( '$emoji $label', - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ), ); @@ -482,7 +482,7 @@ class _PoetryPageState extends ConsumerState { ), child: Text( '💡 ${msg.content}', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), ), ), @@ -527,7 +527,7 @@ class _PoetryPageState extends ConsumerState { ), child: Text( tag, - style: AppTypography.of(context).footnote.copyWith(color: ext.accent), + style: AppTypography.footnote.copyWith(color: ext.accent), ), ), ) @@ -570,7 +570,7 @@ class _PoetryPageState extends ConsumerState { children: [ Text( '📝 译文', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -581,7 +581,7 @@ class _PoetryPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( line, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, height: 1.6, ), @@ -627,7 +627,7 @@ class _PoetryPageState extends ConsumerState { ), child: Text( msg.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, ), ), @@ -702,8 +702,8 @@ class _PoetryPageState extends ConsumerState { child: CupertinoTextField( controller: _inputController, placeholder: '说点什么...', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), - placeholderStyle: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), padding: const EdgeInsets.symmetric( @@ -747,12 +747,12 @@ class _PoetryPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '加载失败', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( error, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.lg), diff --git a/lib/features/poetry/presentation/poetry_settings_page.dart b/lib/features/poetry/presentation/poetry_settings_page.dart index 42cb9c96..96b6d0d2 100644 --- a/lib/features/poetry/presentation/poetry_settings_page.dart +++ b/lib/features/poetry/presentation/poetry_settings_page.dart @@ -59,7 +59,7 @@ class PoetrySettingsPage extends ConsumerWidget { const SizedBox(width: 6), Text( '诗词设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -110,14 +110,14 @@ class PoetrySettingsPage extends ConsumerWidget { children: [ Text( '今日诗词', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( '自定义诗词推送与显示偏好', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -316,14 +316,14 @@ class PoetrySettingsPage extends ConsumerWidget { children: [ Text( '$emoji $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -375,7 +375,7 @@ class PoetrySettingsPage extends ConsumerWidget { Expanded( child: Text( '🕐 $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -392,7 +392,7 @@ class PoetrySettingsPage extends ConsumerWidget { ), child: Text( time, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -436,7 +436,7 @@ class PoetrySettingsPage extends ConsumerWidget { children: [ Text( '$emoji $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -455,7 +455,7 @@ class PoetrySettingsPage extends ConsumerWidget { ), child: Text( opt, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selectedKey == opt ? ext.textOnAccent : ext.textSecondary, @@ -513,7 +513,7 @@ class PoetrySettingsPage extends ConsumerWidget { padding: EdgeInsets.zero, child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -521,7 +521,7 @@ class PoetrySettingsPage extends ConsumerWidget { ), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -530,7 +530,7 @@ class PoetrySettingsPage extends ConsumerWidget { padding: EdgeInsets.zero, child: Text( '确定', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/pomodoro/presentation/pomodoro_page.dart b/lib/features/pomodoro/presentation/pomodoro_page.dart index 4ef2d5c0..c0d72f78 100644 --- a/lib/features/pomodoro/presentation/pomodoro_page.dart +++ b/lib/features/pomodoro/presentation/pomodoro_page.dart @@ -41,7 +41,7 @@ class _PomodoroPageState extends ConsumerState leading: const AdaptiveBackButton(), middle: Text( '🍅 番茄钟', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -114,7 +114,7 @@ class _PomodoroPageState extends ConsumerState const SizedBox(height: AppSpacing.xs), Text( phase.label, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( fontWeight: isActive ? FontWeight.w600 : FontWeight.normal, @@ -174,7 +174,7 @@ class _PomodoroPageState extends ConsumerState const SizedBox(height: AppSpacing.sm), Text( state.displayTime, - style: AppTypography.of(context).display.copyWith( + style: AppTypography.display.copyWith( fontWeight: FontWeight.w300, color: ext.textPrimary, fontFeatures: const [FontFeature.tabularFigures()], @@ -183,7 +183,7 @@ class _PomodoroPageState extends ConsumerState const SizedBox(height: AppSpacing.xs), Text( _statusLabel(state.status), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textHint, ), ), @@ -334,11 +334,11 @@ class _PomodoroPageState extends ConsumerState const SizedBox(height: AppSpacing.xs), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( value, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -362,7 +362,7 @@ class _PomodoroPageState extends ConsumerState const SizedBox(width: AppSpacing.sm), Text( '统计', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -411,11 +411,11 @@ class _PomodoroPageState extends ConsumerState children: [ Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), Text( value, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( fontWeight: FontWeight.w500, color: ext.textPrimary, ), @@ -456,7 +456,7 @@ class _PomodoroPageState extends ConsumerState const SizedBox(width: AppSpacing.sm), Text( '配置', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -526,11 +526,11 @@ class _PomodoroPageState extends ConsumerState children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), Text( display, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w500, color: ext.accent, ), diff --git a/lib/features/progress/presentation/progress_page.dart b/lib/features/progress/presentation/progress_page.dart index 0e36982a..de72d221 100644 --- a/lib/features/progress/presentation/progress_page.dart +++ b/lib/features/progress/presentation/progress_page.dart @@ -133,7 +133,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '进度', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -186,7 +186,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无进度数据', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), ], ), @@ -237,7 +237,7 @@ class _ProgressPageState extends ConsumerState { ), child: Text( divider.text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ), @@ -375,7 +375,7 @@ class _ProgressPageState extends ConsumerState { Expanded( child: Text( item.title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -401,7 +401,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 3), Text( '自定义', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ], ), @@ -419,7 +419,7 @@ class _ProgressPageState extends ConsumerState { if (item.isPast && item.displayStyle == ProgressDisplayStyle.tagOnly) { return Text( item.subtitle, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ); } @@ -428,7 +428,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( item.subtitle, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), _buildDisplayStyleContent(item, ext), @@ -468,12 +468,12 @@ class _ProgressPageState extends ConsumerState { children: [ Text( '进度', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const Spacer(), Text( pctStr, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -541,7 +541,7 @@ class _ProgressPageState extends ConsumerState { ), Text( ringLabel, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -610,7 +610,7 @@ class _ProgressPageState extends ConsumerState { child: Center( child: Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -618,7 +618,7 @@ class _ProgressPageState extends ConsumerState { ), ), const SizedBox(height: 4), - Text(unit, style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text(unit, style: AppTypography.caption2.copyWith(color: ext.textHint)), ], ); } @@ -646,7 +646,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( s.value, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -654,7 +654,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 4), Text( s.label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -678,11 +678,11 @@ class _ProgressPageState extends ConsumerState { children: [ Text( r.label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), Text( r.value, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -712,7 +712,7 @@ class _ProgressPageState extends ConsumerState { ), child: Text( item.tagText ?? '', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: tagColor, fontWeight: FontWeight.w500, ), @@ -738,7 +738,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( '$timeStr · $sourceStr', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), const Spacer(), if (isUser) @@ -781,10 +781,10 @@ class _ProgressPageState extends ConsumerState { controller: _inputController, focusNode: _inputFocusNode, placeholder: '输入进度名称...', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: 10, @@ -914,7 +914,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '添加进度', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -926,7 +926,7 @@ class _ProgressPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '取消', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -942,7 +942,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( '类型', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -1001,7 +1001,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( '目标日期', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -1034,7 +1034,7 @@ class _ProgressPageState extends ConsumerState { }, child: Text( '${selectedDate.year}-${selectedDate.month.toString().padLeft(2, '0')}-${selectedDate.day.toString().padLeft(2, '0')}', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, ), ), @@ -1071,7 +1071,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '添加', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, ), ), @@ -1104,17 +1104,17 @@ class _ProgressPageState extends ConsumerState { width: 64, child: Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), Expanded( child: CupertinoTextField( controller: controller, placeholder: hint, - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.all(AppSpacing.sm), decoration: BoxDecoration( color: ext.bgSecondary, @@ -1169,7 +1169,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '进度设置', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1181,7 +1181,7 @@ class _ProgressPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '完成', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -1283,14 +1283,14 @@ class _ProgressPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -1341,7 +1341,7 @@ class _ProgressPageState extends ConsumerState { ), child: Text( '选择显示样式', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1423,14 +1423,14 @@ class _ProgressPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( desc, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -1489,7 +1489,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '数据管理', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1501,7 +1501,7 @@ class _ProgressPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '完成', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -1521,7 +1521,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无自定义进度', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -1555,7 +1555,7 @@ class _ProgressPageState extends ConsumerState { const SizedBox(width: 6), Text( '清空所有自定义进度', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.systemRed, ), ), @@ -1610,7 +1610,7 @@ class _ProgressPageState extends ConsumerState { children: [ Text( item.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1619,7 +1619,7 @@ class _ProgressPageState extends ConsumerState { ), Text( item.subtitle, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), diff --git a/lib/features/rank/presentation/rank_page.dart b/lib/features/rank/presentation/rank_page.dart index d2d6fba0..0017a963 100644 --- a/lib/features/rank/presentation/rank_page.dart +++ b/lib/features/rank/presentation/rank_page.dart @@ -130,7 +130,7 @@ class _RankPageState extends ConsumerState { children: [ Icon(CupertinoIcons.chart_bar, size: 20, color: ext.textPrimary), const SizedBox(width: 6), - Text('排行榜', style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary)), + Text('排行榜', style: AppTypography.title3.copyWith(color: ext.textPrimary)), ], ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), @@ -274,11 +274,11 @@ class _RankPageState extends ConsumerState { ), const SizedBox(width: 6), Text(season.type == 'weekly' ? '周赛' : '月赛', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w600)), + style: AppTypography.subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w600)), const SizedBox(width: 8), Text( '${startDate.month}/${startDate.day} - ${endDate.month}/${endDate.day}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const Spacer(), Container( @@ -324,12 +324,12 @@ class _RankPageState extends ConsumerState { children: [ Icon(CupertinoIcons.person_crop_circle, size: 20, color: ext.accent), const SizedBox(width: 8), - Text('我的排名', style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text('我的排名', style: AppTypography.subhead.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), const Spacer(), if (hasRank) ...[ Text( '#${rankState.myRank}', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( fontWeight: FontWeight.bold, color: ext.accent, ), @@ -337,12 +337,12 @@ class _RankPageState extends ConsumerState { const SizedBox(width: 8), Text( '${rankState.myValue ?? 0}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ] else Text( '未上榜', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w500, color: ext.textHint, ), @@ -363,7 +363,7 @@ class _RankPageState extends ConsumerState { const SizedBox(height: 12), Text( '暂无排行数据', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -371,7 +371,7 @@ class _RankPageState extends ConsumerState { const SizedBox(height: 4), Text( '赛季数据正在生成中,请稍后再试', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), const SizedBox(height: 16), @@ -396,7 +396,7 @@ class _RankPageState extends ConsumerState { const SizedBox(height: 12), Text( '加载失败', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -404,7 +404,7 @@ class _RankPageState extends ConsumerState { const SizedBox(height: 4), Text( rankState.error ?? '未知错误', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, maxLines: 3, overflow: TextOverflow.ellipsis, diff --git a/lib/features/rank/providers/rank_provider.dart b/lib/features/rank/providers/rank_provider.dart index e51a912b..67a2364a 100644 --- a/lib/features/rank/providers/rank_provider.dart +++ b/lib/features/rank/providers/rank_provider.dart @@ -22,10 +22,15 @@ class RankNotifier extends Notifier { try { final response = await _rankService.getSeasons(); final data = SafeJson.parseResponseData(response); - final List seasonList = SafeJson.parseDynamicList(data['seasons']); + final List seasonList = SafeJson.parseDynamicList( + data['seasons'], + ); final seasons = seasonList .whereType>() - .map((e) => RankSeason.fromJson(e.map((k, v) => MapEntry(k.toString(), v)))) + .map( + (e) => + RankSeason.fromJson(e.map((k, v) => MapEntry(k.toString(), v))), + ) .toList(); state = state.copyWith(seasons: seasons); } catch (e) { @@ -45,7 +50,10 @@ class RankNotifier extends Notifier { final List list = SafeJson.parseDynamicList(data['list']); final items = list .whereType>() - .map((e) => RankItem.fromJson(e.map((k, v) => MapEntry(k.toString(), v)))) + .map( + (e) => + RankItem.fromJson(e.map((k, v) => MapEntry(k.toString(), v))), + ) .toList(); final seasonData = SafeJson.parseMap(data['season']); final season = seasonData.isNotEmpty @@ -72,13 +80,10 @@ class RankNotifier extends Notifier { final rank = SafeJson.parseInt(data['rank']); final value = SafeJson.parseInt(data['value']); Log.d('我的排名加载成功: rank=$rank, value=$value, type=$type'); - state = state.copyWith( - myRank: rank, - myValue: value, - ); + state = state.copyWith(myRank: rank, myValue: value); } catch (e) { Log.w('我的排名加载失败: $e'); - state = state.copyWith(myRank: null, myValue: null); + state = state.copyWith(clearMyRank: true, clearMyValue: true); } } diff --git a/lib/features/reading_report/presentation/reading_report_page.dart b/lib/features/reading_report/presentation/reading_report_page.dart index c9910470..c4c00dec 100644 --- a/lib/features/reading_report/presentation/reading_report_page.dart +++ b/lib/features/reading_report/presentation/reading_report_page.dart @@ -1,4 +1,4 @@ -/// ============================================================ +/// ============================================================ /// 闲言APP — 阅读报告主页面 /// 创建时间: 2026-05-02 /// 更新时间: 2026-05-24 @@ -48,25 +48,34 @@ class _ReadingReportPageState extends ConsumerState { children: [ Icon(CupertinoIcons.chart_bar, size: 18, color: ext.accent), const SizedBox(width: 6), - Text('阅读报告', style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary)), + Text( + '阅读报告', + style: AppTypography.title3.copyWith(color: ext.textPrimary), + ), ], ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, trailing: CupertinoButton( padding: EdgeInsets.zero, - onPressed: state.report != null ? () => _shareReport(state, ext) : null, - child: Icon(CupertinoIcons.share, size: 22, color: state.report != null ? ext.accent : ext.textHint), + onPressed: state.report != null + ? () => _shareReport(state, ext) + : null, + child: Icon( + CupertinoIcons.share, + size: 22, + color: state.report != null ? ext.accent : ext.textHint, + ), ), ), child: SafeArea( child: state.isLoading ? const Center(child: CupertinoActivityIndicator()) : state.error != null - ? _buildError(state, ext) - : state.report == null - ? _buildAllSourcesFailed(state, ext) - : _buildContent(state, ext), + ? _buildError(state, ext) + : state.report == null + ? _buildAllSourcesFailed(state, ext) + : _buildContent(state, ext), ), ); } @@ -78,7 +87,7 @@ class _ReadingReportPageState extends ConsumerState { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( + const Icon( Icons.cloud_off, size: 56, color: CupertinoColors.systemGrey, @@ -86,7 +95,7 @@ class _ReadingReportPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '数据源暂时不可用', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -94,16 +103,14 @@ class _ReadingReportPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '网络似乎出了点问题,请稍后重试', - style: AppTypography.of(context).subhead.copyWith( - color: ext.textHint, - ), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), if (state.error != null) ...[ const SizedBox(height: AppSpacing.xs), Text( state.error!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontFamily: 'monospace', ), @@ -124,14 +131,17 @@ class _ReadingReportPageState extends ConsumerState { ); } - Widget _buildAllSourcesFailed(ReadingReportState state, AppThemeExtension ext) { + Widget _buildAllSourcesFailed( + ReadingReportState state, + AppThemeExtension ext, + ) { return Center( child: Padding( padding: const EdgeInsets.all(AppSpacing.xl), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( + const Icon( Icons.cloud_off, size: 56, color: CupertinoColors.systemGrey, @@ -139,7 +149,7 @@ class _ReadingReportPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '数据源暂时不可用', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -147,9 +157,7 @@ class _ReadingReportPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '所有数据源均加载失败,请检查网络后重试', - style: AppTypography.of(context).subhead.copyWith( - color: ext.textHint, - ), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), if (state.failedSources.isNotEmpty) ...[ @@ -165,7 +173,7 @@ class _ReadingReportPageState extends ConsumerState { ), child: Text( '失败源:${state.failedSources.join('、')}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), textAlign: TextAlign.center, @@ -218,39 +226,39 @@ class _ReadingReportPageState extends ConsumerState { Widget _buildWarningBanner(Set failedSources, AppThemeExtension ext) { return Container( - margin: const EdgeInsets.only(bottom: AppSpacing.md), - padding: const EdgeInsets.symmetric( - horizontal: AppSpacing.md, - vertical: AppSpacing.sm, - ), - decoration: BoxDecoration( - color: ext.warningColor.withValues(alpha: 0.1), - borderRadius: AppRadius.mdBorder, - border: Border.all( - color: ext.warningColor.withValues(alpha: 0.25), - width: 0.5, - ), - ), - child: Row( - children: [ - Icon( - CupertinoIcons.exclamationmark_triangle_fill, - size: 16, - color: ext.warningColor, + margin: const EdgeInsets.only(bottom: AppSpacing.md), + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.md, + vertical: AppSpacing.sm, ), - const SizedBox(width: AppSpacing.sm), - Expanded( - child: Text( - '部分数据加载失败:${failedSources.join('、')}', - style: AppTypography.of(context).caption1.copyWith( - color: ext.warningColor, - fontWeight: FontWeight.w500, - ), + decoration: BoxDecoration( + color: ext.warningColor.withValues(alpha: 0.1), + borderRadius: AppRadius.mdBorder, + border: Border.all( + color: ext.warningColor.withValues(alpha: 0.25), + width: 0.5, ), ), - ], - ), - ) + child: Row( + children: [ + Icon( + CupertinoIcons.exclamationmark_triangle_fill, + size: 16, + color: ext.warningColor, + ), + const SizedBox(width: AppSpacing.sm), + Expanded( + child: Text( + '部分数据加载失败:${failedSources.join('、')}', + style: AppTypography.caption1.copyWith( + color: ext.warningColor, + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + ) .animate() .fadeIn(duration: 300.ms) .slideY(begin: -0.05, end: 0, duration: 300.ms); @@ -262,48 +270,49 @@ class _ReadingReportPageState extends ConsumerState { Widget _buildPeriodSelector(ReportPeriod current, AppThemeExtension ext) { return Container( - padding: const EdgeInsets.all(3), - decoration: BoxDecoration( - color: ext.bgCard, - borderRadius: BorderRadius.circular(10), - border: Border.all( - color: ext.bgElevated.withValues(alpha: 0.5), - width: 0.5, - ), - ), - child: Row( - children: ReportPeriod.values.map((p) { - final isActive = p == current; - return Expanded( - child: GestureDetector( - onTap: () => - ref.read(readingReportProvider.notifier).setPeriod(p), - child: AnimatedContainer( - duration: const Duration(milliseconds: 250), - curve: Curves.easeOutCubic, - padding: const EdgeInsets.symmetric(vertical: 8), - decoration: BoxDecoration( - color: isActive ? ext.accent : Colors.transparent, - borderRadius: BorderRadius.circular(8), - ), - child: Text( - p.label, - textAlign: TextAlign.center, - style: TextStyle( - color: isActive - ? CupertinoColors.white - : ext.textSecondary, - fontSize: 14, - fontWeight: - isActive ? FontWeight.w600 : FontWeight.w500, + padding: const EdgeInsets.all(3), + decoration: BoxDecoration( + color: ext.bgCard, + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: ext.bgElevated.withValues(alpha: 0.5), + width: 0.5, + ), + ), + child: Row( + children: ReportPeriod.values.map((p) { + final isActive = p == current; + return Expanded( + child: GestureDetector( + onTap: () => + ref.read(readingReportProvider.notifier).setPeriod(p), + child: AnimatedContainer( + duration: const Duration(milliseconds: 250), + curve: Curves.easeOutCubic, + padding: const EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + color: isActive ? ext.accent : Colors.transparent, + borderRadius: BorderRadius.circular(8), + ), + child: Text( + p.label, + textAlign: TextAlign.center, + style: TextStyle( + color: isActive + ? CupertinoColors.white + : ext.textSecondary, + fontSize: 14, + fontWeight: isActive + ? FontWeight.w600 + : FontWeight.w500, + ), + ), ), ), - ), - ), - ); - }).toList(), - ), - ) + ); + }).toList(), + ), + ) .animate() .fadeIn(duration: 300.ms) .slideY(begin: -0.05, end: 0, duration: 300.ms); @@ -315,67 +324,64 @@ class _ReadingReportPageState extends ConsumerState { Widget _buildTrendSection(ReadingReport report, AppThemeExtension ext) { return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: ext.bgCard, - borderRadius: BorderRadius.circular(16), - border: Border.all( - color: ext.bgElevated.withValues(alpha: 0.5), - width: 0.5, - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - '📈 阅读趋势', - style: TextStyle( - color: ext.textPrimary, - fontSize: 16, - fontWeight: FontWeight.w700, - ), - ), - GestureDetector( - onTap: () => setState(() => _showSignins = !_showSignins), - child: Row( - children: [ - Container( - width: 8, - height: 8, - decoration: BoxDecoration( - color: _showSignins - ? CupertinoColors.activeGreen - : ext.textHint, - shape: BoxShape.circle, - ), + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: ext.bgCard, + borderRadius: BorderRadius.circular(16), + border: Border.all( + color: ext.bgElevated.withValues(alpha: 0.5), + width: 0.5, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '📈 阅读趋势', + style: TextStyle( + color: ext.textPrimary, + fontSize: 16, + fontWeight: FontWeight.w700, ), - const SizedBox(width: 4), - Text( - '签到', - style: TextStyle( - color: _showSignins - ? CupertinoColors.activeGreen - : ext.textHint, - fontSize: 12, - fontWeight: FontWeight.w500, - ), + ), + GestureDetector( + onTap: () => setState(() => _showSignins = !_showSignins), + child: Row( + children: [ + Container( + width: 8, + height: 8, + decoration: BoxDecoration( + color: _showSignins + ? CupertinoColors.activeGreen + : ext.textHint, + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 4), + Text( + '签到', + style: TextStyle( + color: _showSignins + ? CupertinoColors.activeGreen + : ext.textHint, + fontSize: 12, + fontWeight: FontWeight.w500, + ), + ), + ], ), - ], - ), + ), + ], ), + const SizedBox(height: 12), + TrendChart(trend: report.trend, showSignins: _showSignins), ], ), - const SizedBox(height: 12), - TrendChart( - trend: report.trend, - showSignins: _showSignins, - ), - ], - ), - ) + ) .animate() .fadeIn(duration: 400.ms, delay: 200.ms) .slideY(begin: 0.05, end: 0, duration: 400.ms, delay: 200.ms); @@ -387,31 +393,31 @@ class _ReadingReportPageState extends ConsumerState { Widget _buildHeatmapSection(ReadingReport report, AppThemeExtension ext) { return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: ext.bgCard, - borderRadius: BorderRadius.circular(16), - border: Border.all( - color: ext.bgElevated.withValues(alpha: 0.5), - width: 0.5, - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '🗓️ 活跃热力图', - style: TextStyle( - color: ext.textPrimary, - fontSize: 16, - fontWeight: FontWeight.w700, + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: ext.bgCard, + borderRadius: BorderRadius.circular(16), + border: Border.all( + color: ext.bgElevated.withValues(alpha: 0.5), + width: 0.5, ), ), - const SizedBox(height: 12), - ReadingHeatmap(days: report.heatmap), - ], - ), - ) + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '🗓️ 活跃热力图', + style: TextStyle( + color: ext.textPrimary, + fontSize: 16, + fontWeight: FontWeight.w700, + ), + ), + const SizedBox(height: 12), + ReadingHeatmap(days: report.heatmap), + ], + ), + ) .animate() .fadeIn(duration: 400.ms, delay: 300.ms) .slideY(begin: 0.05, end: 0, duration: 400.ms, delay: 300.ms); @@ -438,8 +444,11 @@ class _ReadingReportPageState extends ConsumerState { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(CupertinoIcons.antenna_radiowaves_left_right, - color: ext.textHint, size: 16), + Icon( + CupertinoIcons.antenna_radiowaves_left_right, + color: ext.textHint, + size: 16, + ), const SizedBox(width: 6), Text( '查看原始数据', @@ -516,7 +525,10 @@ class _ReadingReportPageState extends ConsumerState { // 分享阅读报告 // ============================================================ - Future _shareReport(ReadingReportState state, AppThemeExtension ext) async { + Future _shareReport( + ReadingReportState state, + AppThemeExtension ext, + ) async { try { final report = state.report!; final summary = report.summary; @@ -543,7 +555,9 @@ class _ReadingReportPageState extends ConsumerState { } buffer.writeln('━━━━━━━━━━━━━━━━'); - buffer.writeln('📅 ${DateTime.now().year}/${DateTime.now().month}/${DateTime.now().day}'); + buffer.writeln( + '📅 ${DateTime.now().year}/${DateTime.now().month}/${DateTime.now().day}', + ); buffer.writeln('— 闲言APP'); await SharePlus.instance.share(ShareParams(text: buffer.toString())); diff --git a/lib/features/search/presentation/hot_search_page.dart b/lib/features/search/presentation/hot_search_page.dart index 5ebbb07f..d147bc24 100644 --- a/lib/features/search/presentation/hot_search_page.dart +++ b/lib/features/search/presentation/hot_search_page.dart @@ -160,7 +160,7 @@ class _HotSearchPageState extends ConsumerState { alignment: Alignment.center, child: Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isActive ? ext.accent : ext.textSecondary, fontWeight: isActive ? FontWeight.w700 : FontWeight.w500, fontSize: 14, @@ -220,7 +220,7 @@ class _HotSearchPageState extends ConsumerState { : Center( child: Text( '${index + 1}', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: rankColor, fontWeight: FontWeight.w700, ), @@ -231,7 +231,7 @@ class _HotSearchPageState extends ConsumerState { Expanded( child: Text( keyword.keyword, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: index < 3 ? FontWeight.w600 : FontWeight.w400, ), @@ -251,7 +251,7 @@ class _HotSearchPageState extends ConsumerState { ), child: Text( _formatCount(keyword.count), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -293,7 +293,7 @@ class _HotSearchPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( _error ?? '加载失败', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), CupertinoButton( @@ -314,7 +314,7 @@ class _HotSearchPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '$_periodLabel暂无热搜', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/search/presentation/search_highlight_section.dart b/lib/features/search/presentation/search_highlight_section.dart index 0ed62f3e..1fd89348 100644 --- a/lib/features/search/presentation/search_highlight_section.dart +++ b/lib/features/search/presentation/search_highlight_section.dart @@ -39,7 +39,7 @@ class SearchHighlightSection extends ConsumerWidget { const SizedBox(width: AppSpacing.xs), Text( '关键词高亮', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -56,7 +56,7 @@ class SearchHighlightSection extends ConsumerWidget { ), child: Text( '${highlights.length}', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), ], @@ -103,7 +103,7 @@ class _HighlightCard extends StatelessWidget { ), child: Text( item.feedType, - style: AppTypography.of(context).caption2.copyWith(color: typeColor), + style: AppTypography.caption2.copyWith(color: typeColor), ), ), if (item.author.isNotEmpty) ...[ @@ -112,7 +112,7 @@ class _HighlightCard extends StatelessWidget { const SizedBox(width: 2), Text( item.author, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -121,7 +121,7 @@ class _HighlightCard extends StatelessWidget { if (item.source.isNotEmpty) Text( item.source, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -130,13 +130,13 @@ class _HighlightCard extends StatelessWidget { _buildHighlightedText( ext, highlight.titleHighlight, - AppTypography.of(context).headline, + AppTypography.headline, ext.textPrimary, ) else if (item.title.isNotEmpty) Text( item.title, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -145,14 +145,14 @@ class _HighlightCard extends StatelessWidget { _buildHighlightedText( ext, highlight.contentHighlight, - AppTypography.of(context).body, + AppTypography.body, ext.textSecondary, ), ] else if (item.content.isNotEmpty) ...[ const SizedBox(height: AppSpacing.xs), Text( item.content, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, height: 1.5, ), diff --git a/lib/features/search/presentation/search_page.dart b/lib/features/search/presentation/search_page.dart index 5dea9d66..4ecc172c 100644 --- a/lib/features/search/presentation/search_page.dart +++ b/lib/features/search/presentation/search_page.dart @@ -154,10 +154,10 @@ class _SearchPageState extends ConsumerState { controller: _searchController, focusNode: _focusNode, placeholder: '搜索句子、诗词、影视、文章...', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), decoration: null, @@ -193,7 +193,7 @@ class _SearchPageState extends ConsumerState { onPressed: () => Navigator.pop(context), child: Text( '取消', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -236,7 +236,7 @@ class _SearchPageState extends ConsumerState { const SizedBox(width: 4), Text( opt.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selected ? ext.accent : ext.textSecondary, fontWeight: selected ? FontWeight.w600 @@ -276,7 +276,7 @@ class _SearchPageState extends ConsumerState { alignment: Alignment.center, child: Text( opt.$2, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selected ? ext.accent : ext.textHint, fontWeight: selected ? FontWeight.w600 : FontWeight.normal, ), @@ -347,7 +347,7 @@ class _SearchSuggestions extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -366,7 +366,7 @@ class _SearchSuggestions extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '热门搜索', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -412,7 +412,7 @@ class _SearchSuggestions extends StatelessWidget { alignment: Alignment.center, child: Text( '${index + 1}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: index < 3 ? rankColor : ext.textHint, fontWeight: FontWeight.w700, fontSize: 11, @@ -423,7 +423,7 @@ class _SearchSuggestions extends StatelessWidget { Expanded( child: Text( hot.keyword, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: index < 3 ? FontWeight.w600 : FontWeight.normal, ), @@ -432,7 +432,7 @@ class _SearchSuggestions extends StatelessWidget { if (hot.count > 0) Text( '${hot.count}次', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 11, ), @@ -452,7 +452,7 @@ class _SearchSuggestions extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '热门搜索', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -474,7 +474,7 @@ class _SearchSuggestions extends StatelessWidget { margin: EdgeInsets.zero, child: Text( kw, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -499,7 +499,7 @@ class _SearchSuggestions extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '搜索历史', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -511,7 +511,7 @@ class _SearchSuggestions extends StatelessWidget { onPressed: onClearHistory, child: Text( '清空', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -539,7 +539,7 @@ class _SearchSuggestions extends StatelessWidget { Expanded( child: Text( h, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -577,7 +577,7 @@ class _SearchSuggestions extends StatelessWidget { Expanded( child: Text( s.text, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), if (s.label.isNotEmpty) @@ -604,7 +604,7 @@ class _SearchSuggestions extends StatelessWidget { ), Text( s.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: typeColor, fontSize: 10, ), @@ -650,7 +650,7 @@ class _SearchResults extends ConsumerWidget { const SizedBox(height: AppSpacing.md), Text( state.error!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), CupertinoButton( @@ -658,7 +658,7 @@ class _SearchResults extends ConsumerWidget { ref.read(searchProvider.notifier).search(state.query), child: Text( '重试', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -675,12 +675,12 @@ class _SearchResults extends ConsumerWidget { const SizedBox(height: AppSpacing.md), Text( '未找到相关内容', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( '换个关键词试试', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -710,7 +710,7 @@ class _SearchResults extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( state.isBackgroundLoading ? '加载更多结果...' : '加载中...', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -728,7 +728,7 @@ class _SearchResults extends ConsumerWidget { state.isBackgroundLoading ? '已找到 ${state.feedItems.length} 条,继续搜索...' : '找到 ${state.totalCount} 条结果', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: state.isBackgroundLoading ? ext.accent : ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -741,7 +741,7 @@ class _SearchResults extends ConsumerWidget { if (state.searchAllResult != null && !state.isBackgroundLoading) Text( '模式: ${state.mode}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -778,7 +778,7 @@ class _SearchResults extends ConsumerWidget { ), Text( '${stat.name} ${stat.count}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: color, fontWeight: FontWeight.w600, fontSize: 11, @@ -822,7 +822,7 @@ class _SearchResults extends ConsumerWidget { ), child: Text( item.feedName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: color, fontSize: 10, ), @@ -837,7 +837,7 @@ class _SearchResults extends ConsumerWidget { const SizedBox(width: 2), Text( _formatCount(item.views), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), @@ -850,8 +850,8 @@ class _SearchResults extends ConsumerWidget { _buildHighlightedText( item.title, keyword, - AppTypography.of(context).headline.copyWith(color: ext.textPrimary), - AppTypography.of(context).headline.copyWith( + AppTypography.headline.copyWith(color: ext.textPrimary), + AppTypography.headline.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -861,8 +861,8 @@ class _SearchResults extends ConsumerWidget { _buildHighlightedText( item.summary, keyword, - AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), - AppTypography.of(context).subhead.copyWith( + AppTypography.subhead.copyWith(color: ext.textSecondary), + AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -877,8 +877,8 @@ class _SearchResults extends ConsumerWidget { _buildHighlightedText( item.author, keyword, - AppTypography.of(context).caption1.copyWith(color: ext.textHint), - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith(color: ext.textHint), + AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -974,7 +974,7 @@ class _SearchResults extends ConsumerWidget { const SizedBox(width: 2), Text( count, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/search/presentation/user_preference_page.dart b/lib/features/search/presentation/user_preference_page.dart index 1eb0b7ba..c91ceaa7 100644 --- a/lib/features/search/presentation/user_preference_page.dart +++ b/lib/features/search/presentation/user_preference_page.dart @@ -69,7 +69,7 @@ class _UserPreferencePageState extends ConsumerState { onPressed: _showClearConfirm, child: Text( '清除', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -94,12 +94,12 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无搜索偏好', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Text( '搜索时会自动记录你的类型偏好', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -119,7 +119,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '📊 偏好详情', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -151,7 +151,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '偏好概览', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -187,7 +187,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -197,7 +197,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ); @@ -243,7 +243,7 @@ class _UserPreferencePageState extends ConsumerState { ), child: Text( pref.type, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: typeColor, fontWeight: FontWeight.w600, ), @@ -252,7 +252,7 @@ class _UserPreferencePageState extends ConsumerState { const Spacer(), Text( '${pref.count}次', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -272,7 +272,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '最近搜索: ${_formatTime(pref.lastSearched)}', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -309,7 +309,7 @@ class _UserPreferencePageState extends ConsumerState { children: [ Text( '🎯 内容偏好', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -317,7 +317,7 @@ class _UserPreferencePageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '关闭后推荐内容将不再包含该类型', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), const SizedBox(height: AppSpacing.md), GlassContainer( @@ -334,7 +334,7 @@ class _UserPreferencePageState extends ConsumerState { Expanded( child: Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/share/presentation/share_history_page.dart b/lib/features/share/presentation/share_history_page.dart index 7b3054f7..e1ba6f97 100644 --- a/lib/features/share/presentation/share_history_page.dart +++ b/lib/features/share/presentation/share_history_page.dart @@ -42,7 +42,7 @@ class _ShareHistoryPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '📤 分享历史', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -54,7 +54,7 @@ class _ShareHistoryPageState extends ConsumerState { onPressed: _clearAll, child: Text( '清空', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -76,7 +76,7 @@ class _ShareHistoryPageState extends ConsumerState { error: (e, _) => Center( child: Text( '加载失败: $e', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), ), ), @@ -93,12 +93,12 @@ class _ShareHistoryPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无分享记录', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( '分享句子、卡片等内容后会在这里记录', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -149,7 +149,7 @@ class _ShareHistoryPageState extends ConsumerState { Expanded( child: Text( item.title.isNotEmpty ? item.title : item.content, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -168,7 +168,7 @@ class _ShareHistoryPageState extends ConsumerState { ), child: Text( _shareTypeLabel(resultType), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -179,7 +179,7 @@ class _ShareHistoryPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( item.content, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 2, @@ -194,7 +194,7 @@ class _ShareHistoryPageState extends ConsumerState { Expanded( child: Text( item.note, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontStyle: FontStyle.italic, ), @@ -211,14 +211,14 @@ class _ShareHistoryPageState extends ConsumerState { if (item.shareSource.isNotEmpty) Text( '📍 ${item.shareSource}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), const Spacer(), Text( _formatDate(item.sharedAt), - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/share/presentation/share_target_edit_page.dart b/lib/features/share/presentation/share_target_edit_page.dart index a928482a..af1a7bac 100644 --- a/lib/features/share/presentation/share_target_edit_page.dart +++ b/lib/features/share/presentation/share_target_edit_page.dart @@ -102,7 +102,7 @@ class _ShareTargetEditPageState extends State { leading: const AdaptiveBackButton(), middle: Text( '⚙️ 分享目标管理', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -114,7 +114,7 @@ class _ShareTargetEditPageState extends State { onPressed: _resetToDefaults, child: Text( '重置', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -145,7 +145,7 @@ class _ShareTargetEditPageState extends State { Expanded( child: Text( '拖拽排序 · 开关控制显示 · 已启用 ${_targets.where((t) => t.enabled).length} 项', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -224,7 +224,7 @@ class _ShareTargetEditPageState extends State { children: [ Text( target.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -232,7 +232,7 @@ class _ShareTargetEditPageState extends State { if (isPlatformTarget) Text( '需要配置第三方SDK', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/solar_term/presentation/solar_term_page.dart b/lib/features/solar_term/presentation/solar_term_page.dart index 6b3f8b17..d8bcd81b 100644 --- a/lib/features/solar_term/presentation/solar_term_page.dart +++ b/lib/features/solar_term/presentation/solar_term_page.dart @@ -33,7 +33,7 @@ class SolarTermPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( '🌿 节气日历', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -94,13 +94,13 @@ class SolarTermPage extends ConsumerWidget { children: [ Text( '当前节气', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), Text( term.name, - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -119,7 +119,7 @@ class SolarTermPage extends ConsumerWidget { ), child: Text( '${term.season.label} ${term.season.emoji}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -139,7 +139,7 @@ class SolarTermPage extends ConsumerWidget { children: [ Text( '「${term.poem}」', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontStyle: FontStyle.italic, ), @@ -147,7 +147,7 @@ class SolarTermPage extends ConsumerWidget { const SizedBox(height: 4), Text( '—— ${term.poemAuthor}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -157,12 +157,12 @@ class SolarTermPage extends ConsumerWidget { const SizedBox(height: AppSpacing.sm), Text( term.description, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: 4), Text( '民俗: ${term.customs}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -199,13 +199,13 @@ class SolarTermPage extends ConsumerWidget { children: [ Text( '下一节气', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), Text( term.name, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -224,7 +224,7 @@ class SolarTermPage extends ConsumerWidget { ), child: Text( '${state.daysUntilNext}天后', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -261,7 +261,7 @@ class SolarTermPage extends ConsumerWidget { child: Center( child: Text( '${season.emoji} ${season.label}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -325,7 +325,7 @@ class SolarTermPage extends ConsumerWidget { const SizedBox(width: 6), Text( term.name, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: isCurrent ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -343,7 +343,7 @@ class SolarTermPage extends ConsumerWidget { ), child: Text( '当前', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontSize: 10, ), @@ -357,7 +357,7 @@ class SolarTermPage extends ConsumerWidget { term.poem.length > 12 ? '${term.poem.substring(0, 12)}…' : term.poem, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontStyle: FontStyle.italic, ), @@ -367,7 +367,7 @@ class SolarTermPage extends ConsumerWidget { const SizedBox(height: 2), Text( term.description, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 11, ), @@ -401,14 +401,14 @@ class SolarTermPage extends ConsumerWidget { children: [ Text( '今日是${term.name}!', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( SolarTermService.getSeasonGreeting(term.season), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/source/presentation/source_mix_config_sheet.dart b/lib/features/source/presentation/source_mix_config_sheet.dart index ce17fadf..12f7f7b6 100644 --- a/lib/features/source/presentation/source_mix_config_sheet.dart +++ b/lib/features/source/presentation/source_mix_config_sheet.dart @@ -34,13 +34,13 @@ void showMixModeSheet(BuildContext context, WidgetRef ref) { const SizedBox(width: 8), Text( '混合规则', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), message: Text( '选择句子广场的内容混合方式', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), actions: mixModes.map((mode) { final isSelected = mode.key == currentMode; @@ -129,7 +129,7 @@ void showMixConfigPanel(BuildContext context, WidgetRef ref, String mode) { const SizedBox(width: 8), Text( getMixMode(mode).name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -139,7 +139,7 @@ void showMixConfigPanel(BuildContext context, WidgetRef ref, String mode) { const SizedBox(height: AppSpacing.xs), Text( getMixMode(mode).desc, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -269,7 +269,7 @@ void showHomeCardSourceSheet(BuildContext context, WidgetRef ref) { const SizedBox(width: 8), Text( '首页卡片来源', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -279,14 +279,14 @@ void showHomeCardSourceSheet(BuildContext context, WidgetRef ref) { const SizedBox(height: AppSpacing.xs), Text( '配置首页上方句子卡片的内容来源', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), const SizedBox(height: AppSpacing.md), Text( '混合模式', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -330,7 +330,7 @@ void showHomeCardSourceSheet(BuildContext context, WidgetRef ref) { const SizedBox(width: 4), Text( mode.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, @@ -361,7 +361,7 @@ void showHomeCardSourceSheet(BuildContext context, WidgetRef ref) { Expanded( child: Text( '仅指定分类模式跟随频道管理开关,已开启 ${enabledChannelKeys.length} 个频道', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -404,7 +404,7 @@ void showHomeCardSourceSheet(BuildContext context, WidgetRef ref) { const SizedBox(width: 4), Text( ch.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isEnabled ? ext.accent : ext.textHint, @@ -507,7 +507,7 @@ List _buildRatioSliders( Expanded( child: Text( ch.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -536,7 +536,7 @@ List _buildRatioSliders( width: 40, child: Text( '$ratio%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -575,7 +575,7 @@ Widget _buildSpecificFromChannelToggle( Expanded( child: Text( '仅指定分类模式跟随频道管理开关,已开启 ${enabledChannelKeys.length} 个频道', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -613,7 +613,7 @@ Widget _buildSpecificFromChannelToggle( const SizedBox(width: 4), Text( ch.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isEnabled ? ext.accent : ext.textHint, fontWeight: isEnabled ? FontWeight.w600 : FontWeight.w400, ), @@ -644,7 +644,7 @@ Widget _buildGroupSizeSlider( const SizedBox(width: AppSpacing.xs), Text( '每组条数', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -668,7 +668,7 @@ Widget _buildGroupSizeSlider( width: 32, child: Text( '$groupSize', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -680,7 +680,7 @@ Widget _buildGroupSizeSlider( const SizedBox(height: AppSpacing.xs), Text( '每个分类连续展示N条后切换到下一个分类', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -703,7 +703,7 @@ Widget _buildChannelSelectionHint( const SizedBox(width: AppSpacing.xs), Text( '参与频道', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -713,12 +713,12 @@ Widget _buildChannelSelectionHint( const SizedBox(height: AppSpacing.xs), Text( '当前已启用 ${selectedChannels.length} 个频道参与混合', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( '可通过频道管理中的开关控制参与混合的频道', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/source/presentation/source_page.dart b/lib/features/source/presentation/source_page.dart index ba9abe8e..720e1b6f 100644 --- a/lib/features/source/presentation/source_page.dart +++ b/lib/features/source/presentation/source_page.dart @@ -150,7 +150,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: 6), Text( '句子来源', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -199,7 +199,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '数据总览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -228,7 +228,7 @@ class _SourcePageState extends ConsumerState { children: [ Text( value, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.accent, fontWeight: FontWeight.w800, letterSpacing: -1, @@ -237,7 +237,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), @@ -274,10 +274,10 @@ class _SourcePageState extends ConsumerState { controller: _searchController, focusNode: _searchFocusNode, placeholder: '搜索频道...', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: null, onChanged: (val) => ref.read(sourceProvider.notifier).updateSearch(val), @@ -320,7 +320,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '频道管理', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -334,7 +334,7 @@ class _SourcePageState extends ConsumerState { ), child: Text( '${state.enabledCount} 已启用', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -346,7 +346,7 @@ class _SourcePageState extends ConsumerState { onPressed: _showManageActions, child: Text( '管理', - style: AppTypography.of(context).subhead.copyWith(color: ext.accent), + style: AppTypography.subhead.copyWith(color: ext.accent), ), ), ], @@ -367,7 +367,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '未找到频道', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -421,7 +421,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '显示设置', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -536,7 +536,7 @@ class _SourcePageState extends ConsumerState { alignment: Alignment.center, child: Text( '${state.perPage}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -578,7 +578,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '首页卡片设置', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -642,7 +642,7 @@ class _SourcePageState extends ConsumerState { const SizedBox(width: AppSpacing.xs), Text( '高级', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w700, ), @@ -787,14 +787,14 @@ class _SourcePageState extends ConsumerState { children: [ Text( channel.name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( '${channel.count} 条内容 · ${fmtViews(_getChannelViews(channel.key))} 次浏览', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/source/presentation/source_widgets.dart b/lib/features/source/presentation/source_widgets.dart index 38318938..f00c77eb 100644 --- a/lib/features/source/presentation/source_widgets.dart +++ b/lib/features/source/presentation/source_widgets.dart @@ -94,7 +94,7 @@ class SettingRow extends StatelessWidget { children: [ Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -102,7 +102,7 @@ class SettingRow extends StatelessWidget { if (subtitle != null) Text( subtitle!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -162,7 +162,7 @@ class ChannelCard extends StatelessWidget { children: [ Text( channel.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -170,7 +170,7 @@ class ChannelCard extends StatelessWidget { const SizedBox(height: 2), Text( '${channel.count} 条', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -208,7 +208,7 @@ class DetailStatItem extends StatelessWidget { children: [ Text( value, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: color, fontWeight: FontWeight.w700, ), @@ -216,7 +216,7 @@ class DetailStatItem extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: AppTheme.ext(context).textSecondary, ), ), diff --git a/lib/features/study_plan/presentation/study_plan_page.dart b/lib/features/study_plan/presentation/study_plan_page.dart index d68a8403..b2bdd054 100644 --- a/lib/features/study_plan/presentation/study_plan_page.dart +++ b/lib/features/study_plan/presentation/study_plan_page.dart @@ -48,7 +48,7 @@ class _StudyPlanPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '📚 学习计划', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -80,12 +80,12 @@ class _StudyPlanPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '开始你的学习之旅', - style: AppTypography.of(context).title2.copyWith(color: ext.textPrimary), + style: AppTypography.title2.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '制定学习计划,每日坚持\n积少成多,收获满满', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.xl), @@ -93,7 +93,7 @@ class _StudyPlanPageState extends ConsumerState { onPressed: () => _showCreateSheet(ext), child: Text( '✨ 创建第一个计划', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -174,7 +174,7 @@ class _StudyPlanPageState extends ConsumerState { children: [ Text( '${category.emoji} ${plan.title}', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -193,7 +193,7 @@ class _StudyPlanPageState extends ConsumerState { ), child: Text( '🔥 ${plan.streakDays}天', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemOrange, fontSize: 10, fontWeight: FontWeight.w600, @@ -207,7 +207,7 @@ class _StudyPlanPageState extends ConsumerState { plan.description.isNotEmpty ? plan.description : '每日${plan.dailyGoal}条 · ${category.label}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -216,7 +216,7 @@ class _StudyPlanPageState extends ConsumerState { children: [ Text( '今日 $todayCount/${plan.dailyGoal}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isCompleted ? CupertinoColors.systemGreen : ext.accent, @@ -266,7 +266,7 @@ class _StudyPlanPageState extends ConsumerState { onPressed: () => _quickComplete(ext, plan), child: Text( '✅ 完成1条', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Color(category.colorValue), fontWeight: FontWeight.w600, ), @@ -284,7 +284,7 @@ class _StudyPlanPageState extends ConsumerState { onPressed: () => _showPlanActions(ext, plan), child: Text( '更多', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -322,7 +322,7 @@ class _StudyPlanPageState extends ConsumerState { ? const Text('🎉', style: TextStyle(fontSize: 20)) : Text( '${(progress * 100).toInt()}%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Color(category.colorValue), fontWeight: FontWeight.w700, fontSize: 11, @@ -360,7 +360,7 @@ class _StudyPlanPageState extends ConsumerState { const SizedBox(width: 6), Text( '阅读目标', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -451,7 +451,7 @@ class _StudyPlanPageState extends ConsumerState { children: [ Icon(icon, size: 12, color: isComplete ? CupertinoColors.activeGreen : ext.textSecondary), const SizedBox(width: 4), - Text(label, style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary)), + Text(label, style: AppTypography.caption2.copyWith(color: ext.textSecondary)), ], ), const SizedBox(height: 4), @@ -469,7 +469,7 @@ class _StudyPlanPageState extends ConsumerState { const SizedBox(height: 2), Text( '$current/$target', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isComplete ? CupertinoColors.activeGreen : ext.textHint, fontWeight: FontWeight.w600, ), @@ -500,7 +500,7 @@ class _StudyPlanPageState extends ConsumerState { ), ), const SizedBox(height: 12), - Text('设置阅读目标', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text('设置阅读目标', style: AppTypography.headline.copyWith(color: ext.textPrimary)), const SizedBox(height: 16), _buildGoalSlider(ext, ref, '每日浏览', goal.dailyViewGoal, 1, 50, (v) => ref.read(readingGoalProvider.notifier).setViewGoal(v.round())), const SizedBox(height: 12), @@ -532,8 +532,8 @@ class _StudyPlanPageState extends ConsumerState { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(label, style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary)), - Text('$value', style: AppTypography.of(context).subhead.copyWith(color: ext.accent, fontWeight: FontWeight.w600)), + Text(label, style: AppTypography.subhead.copyWith(color: ext.textPrimary)), + Text('$value', style: AppTypography.subhead.copyWith(color: ext.accent, fontWeight: FontWeight.w600)), ], ), CupertinoSlider( @@ -564,7 +564,7 @@ class _StudyPlanPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '添加新计划', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -747,7 +747,7 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { ), Text( '创建学习计划', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -755,14 +755,14 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { const SizedBox(height: AppSpacing.lg), Text( '选择模板', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), _buildTemplateGrid(ext), const SizedBox(height: AppSpacing.lg), Text( '每日目标', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -785,7 +785,7 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { child: Center( child: Text( '$_dailyGoal 条/天', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -815,7 +815,7 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { onPressed: _create, child: Text( '✨ 创建计划', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -863,7 +863,7 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { children: [ Text( '${template.emoji} ${template.title}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? Color(template.category.colorValue) : ext.textPrimary, @@ -872,7 +872,7 @@ class _CreatePlanSheetState extends ConsumerState<_CreatePlanSheet> { ), Text( template.description, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), @@ -935,7 +935,7 @@ class _PlanDetailSheet extends ConsumerWidget { ), Text( plan.title, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -956,7 +956,7 @@ class _PlanDetailSheet extends ConsumerWidget { return Center( child: Text( '暂无学习记录', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -967,7 +967,7 @@ class _PlanDetailSheet extends ConsumerWidget { children: [ Text( '最近记录', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -991,12 +991,12 @@ class _PlanDetailSheet extends ConsumerWidget { children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), Text( value, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -1013,12 +1013,12 @@ class _PlanDetailSheet extends ConsumerWidget { children: [ Text( '✅ ${record.title.isNotEmpty ? record.title : "完成1条"}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textPrimary), + style: AppTypography.caption1.copyWith(color: ext.textPrimary), ), const Spacer(), Text( _formatDate(record.completedAt), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/tool_center/game/presentation/game_center_page.dart b/lib/features/tool_center/game/presentation/game_center_page.dart index 3413de91..a25a7475 100644 --- a/lib/features/tool_center/game/presentation/game_center_page.dart +++ b/lib/features/tool_center/game/presentation/game_center_page.dart @@ -124,7 +124,7 @@ class _GameCard extends StatelessWidget { Expanded( child: Text( category.name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, fontWeight: FontWeight.w600, ), @@ -136,7 +136,7 @@ class _GameCard extends StatelessWidget { const SizedBox(height: 8), Text( category.desc, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), ), diff --git a/lib/features/tool_center/game/presentation/idiom_chain_page.dart b/lib/features/tool_center/game/presentation/idiom_chain_page.dart index 209c75d6..37afffda 100644 --- a/lib/features/tool_center/game/presentation/idiom_chain_page.dart +++ b/lib/features/tool_center/game/presentation/idiom_chain_page.dart @@ -101,7 +101,7 @@ class _IdiomChainPageState extends State { previousPageTitle: '游戏', trailing: Text( '$_score分', - style: AppTypography.of(context).subhead.copyWith(color: ext?.accent), + style: AppTypography.subhead.copyWith(color: ext?.accent), ), ), child: SafeArea( @@ -134,7 +134,7 @@ class _IdiomChainPageState extends State { child: Center( child: Text( '${index + 1}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isLast ? CupertinoColors.white : (ext?.textPrimary ?? @@ -155,7 +155,7 @@ class _IdiomChainPageState extends State { children: [ Text( item.text, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w600, color: ext?.textPrimary ?? CupertinoColors.label, @@ -165,7 +165,7 @@ class _IdiomChainPageState extends State { Text( item.meaning, style: - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors .secondaryLabel, @@ -189,7 +189,7 @@ class _IdiomChainPageState extends State { padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), child: Text( '下一个字: ${_current!.nextChar}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext?.accent ?? CupertinoColors.activeBlue, fontWeight: FontWeight.w600, ), diff --git a/lib/features/tool_center/game/presentation/poetry_fill_page.dart b/lib/features/tool_center/game/presentation/poetry_fill_page.dart index b85b0683..ec50d3e2 100644 --- a/lib/features/tool_center/game/presentation/poetry_fill_page.dart +++ b/lib/features/tool_center/game/presentation/poetry_fill_page.dart @@ -91,7 +91,7 @@ class _PoetryFillPageState extends State { previousPageTitle: '游戏', trailing: Text( '$_score/$_total', - style: AppTypography.of(context).subhead.copyWith(color: ext?.accent), + style: AppTypography.subhead.copyWith(color: ext?.accent), ), ), child: SafeArea( @@ -100,7 +100,7 @@ class _PoetryFillPageState extends State { : _question == null ? Center( child: Text('暂无题目', - style: AppTypography.of(context).body + style: AppTypography.body .copyWith(color: ext?.textHint))) : SingleChildScrollView( padding: const EdgeInsets.all(16), @@ -116,7 +116,7 @@ class _PoetryFillPageState extends State { children: [ Text( '${_question!.title} — ${_question!.author}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, fontWeight: FontWeight.w600, @@ -125,7 +125,7 @@ class _PoetryFillPageState extends State { const SizedBox(height: 12), Text( _question!.displayContent, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, height: 2, @@ -135,7 +135,7 @@ class _PoetryFillPageState extends State { const SizedBox(height: 8), Text( '💡 提示: ${_question!.hint}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), @@ -157,7 +157,7 @@ class _PoetryFillPageState extends State { children: [ Text( '第${index + 1}空', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), @@ -186,7 +186,7 @@ class _PoetryFillPageState extends State { ), child: Text( opt, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: selected ? CupertinoColors.white : (ext?.textPrimary ?? diff --git a/lib/features/tool_center/game/presentation/quiz_page.dart b/lib/features/tool_center/game/presentation/quiz_page.dart index ce53ccd1..8b32e5a6 100644 --- a/lib/features/tool_center/game/presentation/quiz_page.dart +++ b/lib/features/tool_center/game/presentation/quiz_page.dart @@ -72,7 +72,7 @@ class _QuizPageState extends ConsumerState { style: TextStyle(fontSize: 48)), const SizedBox(height: 12), Text('暂无题目', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext?.textHint)), const SizedBox(height: 16), CupertinoButton( @@ -99,7 +99,7 @@ class _QuizPageState extends ConsumerState { children: [ Text( '${_currentIndex + 1} / ${_items.length}', - style: AppTypography.of(context).caption1.copyWith(color: ext?.textHint), + style: AppTypography.caption1.copyWith(color: ext?.textHint), ), const SizedBox(height: 16), Expanded( @@ -113,7 +113,7 @@ class _QuizPageState extends ConsumerState { if (title.isNotEmpty) Text( title, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, fontWeight: FontWeight.w600, @@ -124,7 +124,7 @@ class _QuizPageState extends ConsumerState { child: SingleChildScrollView( child: Text( isRevealed ? content : '🤔 点击下方按钮揭晓答案...', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: isRevealed ? (ext?.textPrimary ?? CupertinoColors.label) : (ext?.textHint ?? diff --git a/lib/features/tool_center/health/presentation/health_page.dart b/lib/features/tool_center/health/presentation/health_page.dart index 2794a770..7f1bf03e 100644 --- a/lib/features/tool_center/health/presentation/health_page.dart +++ b/lib/features/tool_center/health/presentation/health_page.dart @@ -86,7 +86,7 @@ class _CategoryCard extends StatelessWidget { Expanded( child: Text( category.name, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext?.textPrimary ?? CupertinoColors.label, fontWeight: FontWeight.w600, ), @@ -98,7 +98,7 @@ class _CategoryCard extends StatelessWidget { const SizedBox(height: 8), Text( category.desc, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, ), ), diff --git a/lib/features/tool_center/health/presentation/health_search_page.dart b/lib/features/tool_center/health/presentation/health_search_page.dart index bfa91448..0f630f8d 100644 --- a/lib/features/tool_center/health/presentation/health_search_page.dart +++ b/lib/features/tool_center/health/presentation/health_search_page.dart @@ -84,7 +84,7 @@ class _HealthSearchPageState extends ConsumerState { ? Center( child: Text( '暂无内容', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext?.textHint ?? CupertinoColors.placeholderText, ), @@ -130,7 +130,7 @@ class _HealthSearchPageState extends ConsumerState { if (title.isNotEmpty) Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w600, color: ext?.textPrimary ?? @@ -143,7 +143,7 @@ class _HealthSearchPageState extends ConsumerState { const SizedBox(height: 6), Text( content, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext?.textSecondary ?? CupertinoColors.secondaryLabel, diff --git a/lib/features/tool_center/inspiration/presentation/pages/chat/chat_flow_page.dart b/lib/features/tool_center/inspiration/presentation/pages/chat/chat_flow_page.dart index 6205ded1..dbcfdd30 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/chat/chat_flow_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/chat/chat_flow_page.dart @@ -272,7 +272,7 @@ class _ChatFlowPageState extends ConsumerState leading: const AdaptiveBackButton(), middle: Text( widget.isReadlater ? '📖 稍后读' : '💬 会话流', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, diff --git a/lib/features/tool_center/inspiration/presentation/pages/chat/chat_settings_page.dart b/lib/features/tool_center/inspiration/presentation/pages/chat/chat_settings_page.dart index 91eb8188..19f806e3 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/chat/chat_settings_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/chat/chat_settings_page.dart @@ -55,7 +55,7 @@ class _ChatSettingsPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '⚙️ 聊天设置', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -161,7 +161,7 @@ class _ChatSettingsPageState extends ConsumerState { children: [ Text( conv?.name ?? '会话流', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -169,7 +169,7 @@ class _ChatSettingsPageState extends ConsumerState { const SizedBox(height: 2), Text( conv?.description ?? '默认会话', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -193,7 +193,7 @@ class _ChatSettingsPageState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), child: Text( title, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -236,12 +236,12 @@ class _ChatSettingsPageState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).body.copyWith(color: textColor), + style: AppTypography.body.copyWith(color: textColor), ), if (subtitle != null) Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -325,7 +325,7 @@ class _ChatSettingsPageState extends ConsumerState { builder: (ctx) => CupertinoActionSheet( title: Text( '🎨 主题色', - style: AppTypography.of(context).headline.copyWith(fontWeight: FontWeight.w600), + style: AppTypography.headline.copyWith(fontWeight: FontWeight.w600), ), message: const Text('选择会话的强调色'), actions: [ @@ -446,7 +446,7 @@ class _ChatSettingsPageState extends ConsumerState { title: const Text('🔄 同步'), content: Text( '云端同步功能将在后续版本中开放。\n当前数据仅存储在本地。', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), actions: [ CupertinoDialogAction( @@ -506,7 +506,7 @@ class _ChatSettingsPageState extends ConsumerState { children: [ Text( '🏷️ 分类管理', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -518,7 +518,7 @@ class _ChatSettingsPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '完成', - style: AppTypography.of(context).body.copyWith(color: ext.accent), + style: AppTypography.body.copyWith(color: ext.accent), ), ), ], @@ -614,7 +614,7 @@ class _ChatSettingsPageState extends ConsumerState { children: [ Text( '🗑️ 回收站', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -632,7 +632,7 @@ class _ChatSettingsPageState extends ConsumerState { }, child: Text( '清空', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.systemRed, ), ), @@ -643,7 +643,7 @@ class _ChatSettingsPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '关闭', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -657,7 +657,7 @@ class _ChatSettingsPageState extends ConsumerState { padding: const EdgeInsets.all(AppSpacing.lg), child: Text( '回收站为空', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), ) else @@ -679,7 +679,7 @@ class _ChatSettingsPageState extends ConsumerState { }, child: Text( '恢复', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, ), ), @@ -694,7 +694,7 @@ class _ChatSettingsPageState extends ConsumerState { }, child: Text( '删除', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -718,7 +718,7 @@ class _ChatSettingsPageState extends ConsumerState { title: const Text('⚠️ 清空消息'), content: Text( '确定要清空当前会话的所有消息吗?\n消息将移入回收站,可恢复。', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), actions: [ CupertinoDialogAction( @@ -772,12 +772,12 @@ class _ChatSettingsPageState extends ConsumerState { overflow: titleMaxLines != null ? TextOverflow.ellipsis : null, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), if (subtitle != null) Text( subtitle, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/chat/hidden_sessions_page.dart b/lib/features/tool_center/inspiration/presentation/pages/chat/hidden_sessions_page.dart index f4746bc2..fd8937f6 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/chat/hidden_sessions_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/chat/hidden_sessions_page.dart @@ -34,7 +34,7 @@ class HiddenSessionsPage extends ConsumerWidget { leading: const AdaptiveBackButton(), middle: Text( '👁️‍🗨️ 隐藏的会话', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -57,12 +57,12 @@ class HiddenSessionsPage extends ConsumerWidget { const SizedBox(height: AppSpacing.md), Text( '没有隐藏的会话', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( '左滑会话可将其隐藏', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -145,7 +145,7 @@ class HiddenSessionsPage extends ConsumerWidget { children: [ Text( session.displayName, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -155,7 +155,7 @@ class HiddenSessionsPage extends ConsumerWidget { const SizedBox(height: 3), Text( session.lastMessage, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), maxLines: 1, @@ -172,7 +172,7 @@ class HiddenSessionsPage extends ConsumerWidget { ), child: Text( '已隐藏', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/document_preview_page.dart b/lib/features/tool_center/inspiration/presentation/pages/document_preview_page.dart index 0e59de03..7c433080 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/document_preview_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/document_preview_page.dart @@ -147,7 +147,7 @@ class _DocumentPreviewPageState extends State { leading: const AdaptiveBackButton(), middle: Text( '文档预览', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -190,12 +190,12 @@ class _DocumentPreviewPageState extends State { const SizedBox(height: AppSpacing.md), Text( '文件不存在或已移除', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Text( _displayName, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), textAlign: TextAlign.center, maxLines: 2, overflow: TextOverflow.ellipsis, @@ -239,7 +239,7 @@ class _DocumentPreviewPageState extends State { const SizedBox(height: AppSpacing.md), Text( _displayName, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -259,7 +259,7 @@ class _DocumentPreviewPageState extends State { ), child: Text( _displayType, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -277,7 +277,7 @@ class _DocumentPreviewPageState extends State { children: [ Text( '📋 文件信息', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -304,13 +304,13 @@ class _DocumentPreviewPageState extends State { width: 100, child: Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ), Expanded( child: Text( value, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -337,7 +337,7 @@ class _DocumentPreviewPageState extends State { const SizedBox(width: AppSpacing.sm), Text( '打开文件', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.textOnAccent, fontWeight: FontWeight.w600, ), @@ -362,7 +362,7 @@ class _DocumentPreviewPageState extends State { const SizedBox(width: AppSpacing.xs), Text( '分享', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -387,7 +387,7 @@ class _DocumentPreviewPageState extends State { const SizedBox(width: AppSpacing.xs), Text( '保存到相册', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/home/discover_page.dart b/lib/features/tool_center/inspiration/presentation/pages/home/discover_page.dart index e5d45950..ad7e9b70 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/home/discover_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/home/discover_page.dart @@ -187,7 +187,7 @@ class _DiscoverPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无发现', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, ), ), @@ -356,7 +356,7 @@ class _DiscoverPageState extends ConsumerState { const SizedBox(width: 4), Text( _viewMode == DiscoverViewMode.list ? '列表' : '卡片', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -468,7 +468,7 @@ class _TagChip extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, ), @@ -511,7 +511,7 @@ class _QuickEntry extends StatelessWidget { const SizedBox(height: 2), Text( title, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), overflow: TextOverflow.ellipsis, @@ -548,7 +548,7 @@ class _InspirationCard extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( sentence.category.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -560,7 +560,7 @@ class _InspirationCard extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( sentence.text.cleanHtml, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -573,7 +573,7 @@ class _InspirationCard extends StatelessWidget { if (sentence.author != null) Text( '—— ${sentence.author!}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -586,7 +586,7 @@ class _InspirationCard extends StatelessWidget { const SizedBox(width: 2), Text( sentence.source!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -626,7 +626,7 @@ class _InspirationCard extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( sentence.text.cleanHtml, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -635,7 +635,7 @@ class _InspirationCard extends StatelessWidget { if (sentence.author != null) Text( '—— ${sentence.author!}', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -647,7 +647,7 @@ class _InspirationCard extends StatelessWidget { const SizedBox(width: AppSpacing.xs), Text( '来自: ${sentence.source!}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -801,7 +801,7 @@ class _GridCard extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( sentence.text.cleanHtml, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, height: 1.6, ), @@ -810,7 +810,7 @@ class _GridCard extends StatelessWidget { if (sentence.author != null) Text( '—— ${sentence.author!}', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.lg), Row( diff --git a/lib/features/tool_center/inspiration/presentation/pages/home/footprint_page.dart b/lib/features/tool_center/inspiration/presentation/pages/home/footprint_page.dart index 7dc6edce..340546cb 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/home/footprint_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/home/footprint_page.dart @@ -75,7 +75,7 @@ class _FootprintPageState extends ConsumerState { : CupertinoNavigationBar( middle: Text( '👣 足迹', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -117,7 +117,7 @@ class _FootprintPageState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 6), child: Text( tab.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _currentTab == tab ? ext.textPrimary : ext.textHint, fontWeight: _currentTab == tab ? FontWeight.w600 @@ -167,12 +167,12 @@ class _FootprintPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '登录后查看足迹', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '浏览、点赞、收藏、笔记一目了然', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/home/inspiration_page.dart b/lib/features/tool_center/inspiration/presentation/pages/home/inspiration_page.dart index 34289c40..e32d5a37 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/home/inspiration_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/home/inspiration_page.dart @@ -85,7 +85,7 @@ class _InspirationPageState extends ConsumerState { const SizedBox(width: 6), Text( '灵感', - style: AppTypography.of(context).title1.copyWith(color: ext.textPrimary), + style: AppTypography.title1.copyWith(color: ext.textPrimary), ), const Spacer(), GestureDetector( @@ -278,7 +278,7 @@ class _InspirationPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( indicatorText, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: indicatorColor, fontWeight: isRefreshZone || isToolZone ? FontWeight.w600 @@ -292,7 +292,7 @@ class _InspirationPageState extends ConsumerState { padding: const EdgeInsets.only(top: AppSpacing.xs), child: Text( '🔧 工具中心', - style: AppTypography.of(context).footnote.copyWith(color: ext.textHint), + style: AppTypography.footnote.copyWith(color: ext.textHint), ), ), ], @@ -321,7 +321,7 @@ class _InspirationPageState extends ConsumerState { ], Text( title, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -329,7 +329,7 @@ class _InspirationPageState extends ConsumerState { const SizedBox(width: 4), Text( '$count', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -416,7 +416,7 @@ class _InspirationPageState extends ConsumerState { children: [ Text( '✏️ 备注', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -428,7 +428,7 @@ class _InspirationPageState extends ConsumerState { onPressed: () => Navigator.pop(ctx), child: Text( '取消', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), ), ], @@ -450,13 +450,13 @@ class _InspirationPageState extends ConsumerState { children: [ Text( '原始名称', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), Text( session.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -470,7 +470,7 @@ class _InspirationPageState extends ConsumerState { CupertinoTextField( controller: controller, placeholder: '输入备注名(留空则使用原始名称)', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary, borderRadius: AppRadius.mdBorder, @@ -484,7 +484,7 @@ class _InspirationPageState extends ConsumerState { children: [ Text( '💡 清空备注后将恢复原始名称「${session.name}」', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -529,7 +529,7 @@ class _InspirationPageState extends ConsumerState { child: Center( child: Text( '⬆️ 下拉打开工具中心', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ); diff --git a/lib/features/tool_center/inspiration/presentation/pages/readlater_stats_page.dart b/lib/features/tool_center/inspiration/presentation/pages/readlater_stats_page.dart index ae6b7772..498d1b69 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/readlater_stats_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/readlater_stats_page.dart @@ -30,7 +30,7 @@ class ReadlaterStatsPage extends StatelessWidget { leading: const AdaptiveBackButton(), middle: Text( '📊 阅读统计', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -137,7 +137,7 @@ class ReadlaterStatsPage extends StatelessWidget { title: percent > 0.05 ? '${(percent * 100).toStringAsFixed(0)}%' : '', color: colors[i % colors.length], radius: 48, - titleStyle: AppTypography.of(context).caption1.copyWith( + titleStyle: AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w700, ), @@ -153,7 +153,7 @@ class ReadlaterStatsPage extends StatelessWidget { children: [ Text( '📊 类型分布', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -165,7 +165,7 @@ class ReadlaterStatsPage extends StatelessWidget { padding: const EdgeInsets.all(AppSpacing.xl), child: Text( '暂无数据', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ), ) @@ -206,7 +206,7 @@ class ReadlaterStatsPage extends StatelessWidget { Expanded( child: Text( entry.key, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 1, @@ -215,7 +215,7 @@ class ReadlaterStatsPage extends StatelessWidget { ), Text( '${entry.value}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -276,7 +276,7 @@ class ReadlaterStatsPage extends StatelessWidget { children: [ Text( '📈 最近7天新增', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -304,7 +304,7 @@ class ReadlaterStatsPage extends StatelessWidget { interval: chartMaxY > 4 ? (chartMaxY / 4) : 1, getTitlesWidget: (value, _) => Text( value.toInt().toString(), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -322,7 +322,7 @@ class ReadlaterStatsPage extends StatelessWidget { } return Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ); @@ -371,7 +371,7 @@ class ReadlaterStatsPage extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()} 条', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -444,7 +444,7 @@ class _StatCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: color, fontWeight: FontWeight.bold, ), @@ -452,7 +452,7 @@ class _StatCard extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool/calc_tool_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool/calc_tool_page.dart index 54119c3d..aed1892a 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool/calc_tool_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool/calc_tool_page.dart @@ -212,7 +212,7 @@ class _CalcToolPageState extends ConsumerState { Expanded( child: Text( widget.config.description!, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -231,7 +231,7 @@ class _CalcToolPageState extends ConsumerState { children: [ Text( field.label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Container( @@ -242,10 +242,10 @@ class _CalcToolPageState extends ConsumerState { child: CupertinoTextField( controller: _controllers[field.key], placeholder: field.hintText, - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm + 2, @@ -257,7 +257,7 @@ class _CalcToolPageState extends ConsumerState { padding: const EdgeInsets.only(left: AppSpacing.md), child: Text( field.prefix!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -268,7 +268,7 @@ class _CalcToolPageState extends ConsumerState { padding: const EdgeInsets.only(right: AppSpacing.md), child: Text( field.suffix!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textSecondary, ), ), @@ -290,7 +290,7 @@ class _CalcToolPageState extends ConsumerState { children: [ Text( '原始单位', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xs), Container( @@ -311,7 +311,7 @@ class _CalcToolPageState extends ConsumerState { ), child: Text( unit.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _selectedUnit == unit.value ? CupertinoColors.white : ext.textPrimary, @@ -342,7 +342,7 @@ class _CalcToolPageState extends ConsumerState { ? const CupertinoActivityIndicator(color: CupertinoColors.white) : Text( '🔍 查询', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: CupertinoColors.white, ), ), @@ -360,7 +360,7 @@ class _CalcToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '正在查询...', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -387,7 +387,7 @@ class _CalcToolPageState extends ConsumerState { Expanded( child: Text( _error!, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.systemRed, ), ), @@ -425,7 +425,7 @@ class _CalcToolPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '查询结果', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -443,7 +443,7 @@ class _CalcToolPageState extends ConsumerState { width: 80, child: Text( _formatLabel(entry.key), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -451,7 +451,7 @@ class _CalcToolPageState extends ConsumerState { Expanded( child: Text( entry.value.toString().cleanHtml, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool/china_colors_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool/china_colors_page.dart index d4216e66..8e9aaa23 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool/china_colors_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool/china_colors_page.dart @@ -289,7 +289,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '中国传统色', - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w700, ), @@ -297,7 +297,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: 2), Text( '千年色彩,一触即达', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.white.withValues(alpha: 0.85), ), ), @@ -327,7 +327,7 @@ class _ChinaColorsPageState extends ConsumerState { ), child: Text( text, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white.withValues(alpha: 0.9), fontWeight: FontWeight.w500, ), @@ -342,8 +342,8 @@ class _ChinaColorsPageState extends ConsumerState { child: CupertinoSearchTextField( controller: _searchController, placeholder: '搜索色彩名称、色值…', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), backgroundColor: ext.bgSecondary, borderRadius: BorderRadius.circular(AppRadius.lg), onChanged: (v) => setState(() => _searchQuery = v.trim()), @@ -404,7 +404,7 @@ class _ChinaColorsPageState extends ConsumerState { ), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? CupertinoColors.white : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, ), @@ -453,7 +453,7 @@ class _ChinaColorsPageState extends ConsumerState { ), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: active ? ext.textPrimary : ext.textSecondary, fontWeight: active ? FontWeight.w600 : FontWeight.normal, ), @@ -494,7 +494,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( _error!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton(onPressed: _loadColors, child: const Text('重试')), @@ -512,7 +512,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '暂无色彩数据', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), ], ), @@ -531,7 +531,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '未找到 "$_searchQuery" 相关色彩', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -642,7 +642,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '— 到底了 · 共 $count 色 —', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontWeight: FontWeight.w400, ), @@ -650,7 +650,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.xs), Text( '🎨 数据来源:chinese-colors', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint.withValues(alpha: 0.6), ), ), @@ -689,7 +689,7 @@ class _ChinaColorsPageState extends ConsumerState { children: [ Text( item.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _isLight(colorValue) ? ext.textPrimary : CupertinoColors.white, @@ -701,7 +701,7 @@ class _ChinaColorsPageState extends ConsumerState { ), Text( item.hex, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _isLight(colorValue) ? ext.textSecondary : CupertinoColors.white.withValues(alpha: 0.7), @@ -750,20 +750,20 @@ class _ChinaColorsPageState extends ConsumerState { children: [ Text( item.name, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: FontWeight.w500, ), ), Text( item.hex, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), if (item.intro != null && item.intro!.isNotEmpty) Text( item.intro!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), maxLines: 1, @@ -832,7 +832,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( item.name, - style: AppTypography.of(context).title1.copyWith(color: ext.textPrimary), + style: AppTypography.title1.copyWith(color: ext.textPrimary), ), if (item.intro != null && item.intro!.isNotEmpty) ...[ const SizedBox(height: AppSpacing.xs), @@ -840,7 +840,7 @@ class _ChinaColorsPageState extends ConsumerState { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm), child: Text( item.intro!, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, height: 1.5, ), @@ -876,7 +876,7 @@ class _ChinaColorsPageState extends ConsumerState { }, child: Text( '📋 复制', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -909,7 +909,7 @@ class _ChinaColorsPageState extends ConsumerState { }, child: Text( '📤 分享', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -934,7 +934,7 @@ class _ChinaColorsPageState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, letterSpacing: 0.5, ), @@ -942,7 +942,7 @@ class _ChinaColorsPageState extends ConsumerState { const SizedBox(height: 2), Text( value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( fontWeight: FontWeight.w600, fontFamily: 'SF Mono', ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool/hanzi_tool_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool/hanzi_tool_page.dart index 19afc72b..450cd36e 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool/hanzi_tool_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool/hanzi_tool_page.dart @@ -370,8 +370,8 @@ class _HanziToolPageState extends ConsumerState { controller: _controller, focusNode: _focusNode, placeholder: widget.config.hintText, - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm + 2, @@ -429,7 +429,7 @@ class _HanziToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( widget.config.emptyMessage, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.xl), _buildQuickActions(ext), @@ -455,7 +455,7 @@ class _HanziToolPageState extends ConsumerState { children: [ Text( '🕐 查询历史', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -470,7 +470,7 @@ class _HanziToolPageState extends ConsumerState { }, child: Text( '清空', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -526,14 +526,14 @@ class _HanziToolPageState extends ConsumerState { children: [ Text( record.query, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), const Spacer(), Text( record.displayType, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -570,7 +570,7 @@ class _HanziToolPageState extends ConsumerState { }, child: Text( char, - style: AppTypography.of(context).callout.copyWith(color: ext.textPrimary), + style: AppTypography.callout.copyWith(color: ext.textPrimary), ), ); }).toList(), @@ -607,7 +607,7 @@ class _HanziToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( error, - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -630,7 +630,7 @@ class _HanziToolPageState extends ConsumerState { return Center( child: Text( '暂无结果', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ), ); } @@ -766,7 +766,7 @@ class _HanziToolPageState extends ConsumerState { children: [ Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -786,7 +786,7 @@ class _HanziToolPageState extends ConsumerState { ), child: Text( v.toString().cleanHtml, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textPrimary, ), ), @@ -807,7 +807,7 @@ class _HanziToolPageState extends ConsumerState { width: 72, child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -815,7 +815,7 @@ class _HanziToolPageState extends ConsumerState { Expanded( child: Text( value.toString().cleanHtml, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -838,7 +838,7 @@ class _HanziToolPageState extends ConsumerState { ), child: Text( text.cleanHtml, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ); } diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool/ocr_tool_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool/ocr_tool_page.dart index dea73b2e..adc9d914 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool/ocr_tool_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool/ocr_tool_page.dart @@ -45,7 +45,7 @@ class _OcrToolPageState extends ConsumerState { return CupertinoPageScaffold( navigationBar: CupertinoNavigationBar( leading: const AdaptiveBackButton(), - middle: Text('📷 OCR识别', style: AppTypography.of(context).title3), + middle: Text('📷 OCR识别', style: AppTypography.title3), backgroundColor: ext.bgPrimary.withValues(alpha: 0.9), border: null, ), @@ -75,7 +75,7 @@ class _OcrToolPageState extends ConsumerState { children: [ Text( '📷 选择图片进行文字识别', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -140,7 +140,7 @@ class _OcrToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '正在识别中…', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), @@ -164,7 +164,7 @@ class _OcrToolPageState extends ConsumerState { children: [ Text( '📝 识别结果', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -178,7 +178,7 @@ class _OcrToolPageState extends ConsumerState { }, child: Text( '📤 分享', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), CupertinoButton( @@ -192,7 +192,7 @@ class _OcrToolPageState extends ConsumerState { }, child: Text( '📋 复制', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ], @@ -200,7 +200,7 @@ class _OcrToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), SelectableText( _result ?? '', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ], ), @@ -218,7 +218,7 @@ class _OcrToolPageState extends ConsumerState { children: [ Text( '🕐 识别历史', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -233,7 +233,7 @@ class _OcrToolPageState extends ConsumerState { }, child: Text( '清空', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -274,7 +274,7 @@ class _OcrToolPageState extends ConsumerState { item.text.length > 80 ? '${item.text.substring(0, 80)}…' : item.text, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), maxLines: 3, diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool/pinyin_tool_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool/pinyin_tool_page.dart index a7bf91cf..f15991ba 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool/pinyin_tool_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool/pinyin_tool_page.dart @@ -138,8 +138,8 @@ class _PinyinToolPageState extends ConsumerState { child: CupertinoTextField( controller: _controller, placeholder: '输入汉字,如:闲言碎语', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm + 2, @@ -157,7 +157,7 @@ class _PinyinToolPageState extends ConsumerState { children: [ Text( '转换模式', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.sm), Wrap( @@ -190,7 +190,7 @@ class _PinyinToolPageState extends ConsumerState { children: [ Text( mode.label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: selected ? ext.accent : ext.textSecondary, fontWeight: selected ? FontWeight.w600 @@ -199,7 +199,7 @@ class _PinyinToolPageState extends ConsumerState { ), Text( mode.example, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selected ? ext.accent : ext.textHint, ), ), @@ -222,7 +222,7 @@ class _PinyinToolPageState extends ConsumerState { onPressed: _convert, child: Text( '🔤 转换拼音', - style: AppTypography.of(context).title3.copyWith(color: CupertinoColors.white), + style: AppTypography.title3.copyWith(color: CupertinoColors.white), ), ), ); @@ -249,7 +249,7 @@ class _PinyinToolPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '转换结果', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -275,7 +275,7 @@ class _PinyinToolPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), SelectableText( _result, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool_detail_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool_detail_page.dart index 0674437c..e6437b10 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool_detail_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool_detail_page.dart @@ -149,7 +149,7 @@ class _ToolDetailPageState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( tool.name, - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w700, ), @@ -158,7 +158,7 @@ class _ToolDetailPageState extends ConsumerState { const SizedBox(height: 4), Text( tool.description!, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white.withValues(alpha: 0.85), ), ), @@ -196,7 +196,7 @@ class _ToolDetailPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '状态: ${tool.status.label}', - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), const Spacer(), Container( @@ -209,7 +209,7 @@ class _ToolDetailPageState extends ConsumerState { ), child: Text( tool.toolType.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: tool.toolType == ToolType.local ? CupertinoColors.activeGreen : CupertinoColors.activeBlue, @@ -235,7 +235,7 @@ class _ToolDetailPageState extends ConsumerState { children: [ Text( '📋 基本信息', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), _buildInfoRow(ext, '🏷️ 分类', tool.category.label), @@ -258,13 +258,13 @@ class _ToolDetailPageState extends ConsumerState { width: 90, child: Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), Expanded( child: Text( value, - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), ), ), ], @@ -287,7 +287,7 @@ class _ToolDetailPageState extends ConsumerState { children: [ Text( '🏷️ 标签', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Wrap( @@ -306,7 +306,7 @@ class _ToolDetailPageState extends ConsumerState { ), child: Text( tag, - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ), ) @@ -330,7 +330,7 @@ class _ToolDetailPageState extends ConsumerState { children: [ Text( '📊 使用统计', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -378,14 +378,14 @@ class _ToolDetailPageState extends ConsumerState { const SizedBox(height: 4), Text( value, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), ), Text( label, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ); @@ -404,7 +404,7 @@ class _ToolDetailPageState extends ConsumerState { children: [ Text( '⭐ 评分', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Row( @@ -430,7 +430,7 @@ class _ToolDetailPageState extends ConsumerState { Center( child: Text( _userRating > 0 ? '您评了 $_userRating 分' : '点击星星评分', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -452,7 +452,7 @@ class _ToolDetailPageState extends ConsumerState { children: [ Text( '📖 详细说明', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), AppMarkdownBody(data: desc), @@ -471,7 +471,7 @@ class _ToolDetailPageState extends ConsumerState { onPressed: isAvailable ? () => _navigateToTool(tool) : null, child: Text( isAvailable ? '🚀 立即使用' : '当前不可用', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: isAvailable ? CupertinoColors.white : ext.textHint, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool_list_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool_list_page.dart index a64fea64..c7d187d9 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool_list_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool_list_page.dart @@ -415,8 +415,8 @@ class _ToolListPageState extends ConsumerState { child: CupertinoTextField( controller: _searchController, placeholder: '搜索${widget.title}...', - placeholderStyle: AppTypography.of(context).subhead.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.subhead.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm, @@ -458,7 +458,7 @@ class _ToolListPageState extends ConsumerState { ), child: Text( entry.value.toString(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? CupertinoColors.white : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, ), @@ -484,7 +484,7 @@ class _ToolListPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( _error!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton( @@ -515,7 +515,7 @@ class _ToolListPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( widget.showSearch ? '输入关键词搜索' : '暂无数据', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), ], ), @@ -554,7 +554,7 @@ class _ToolListPageState extends ConsumerState { child: Center( child: Text( '已加载全部 $_total 条', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ); @@ -612,7 +612,7 @@ class _ToolListPageState extends ConsumerState { child: Center( child: Text( '共 $_total 条', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ), @@ -685,7 +685,7 @@ class _ToolListPageState extends ConsumerState { if (title.toString().isNotEmpty) Text( title.toString(), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _isHitokoto ? CupertinoColors.white : ext.textPrimary, @@ -698,7 +698,7 @@ class _ToolListPageState extends ConsumerState { const SizedBox(height: 4), Text( subtitle.toString().cleanHtml, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _isHitokoto ? CupertinoColors.white.withValues(alpha: 0.8) : ext.textSecondary, @@ -711,7 +711,7 @@ class _ToolListPageState extends ConsumerState { const SizedBox(height: 4), Text( extra.toString(), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _isHitokoto ? CupertinoColors.white.withValues(alpha: 0.6) : ext.textHint, @@ -750,7 +750,7 @@ class _ToolListPageState extends ConsumerState { const SizedBox(width: 6), Text( '查看工具详情', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/tool_search_page.dart b/lib/features/tool_center/inspiration/presentation/pages/tool_search_page.dart index b347ef24..ec07849f 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/tool_search_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/tool_search_page.dart @@ -200,8 +200,8 @@ class _ToolSearchPageState extends ConsumerState { child: CupertinoTextField( controller: _controller, placeholder: widget.placeholder, - placeholderStyle: AppTypography.of(context).subhead.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.subhead.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm, @@ -226,7 +226,7 @@ class _ToolSearchPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( _error!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const SizedBox(height: AppSpacing.md), CupertinoButton(onPressed: _search, child: const Text('重试')), @@ -251,7 +251,7 @@ class _ToolSearchPageState extends ConsumerState { const SizedBox(height: AppSpacing.md), Text( '输入关键词开始查询', - style: AppTypography.of(context).title3.copyWith(color: ext.textSecondary), + style: AppTypography.title3.copyWith(color: ext.textSecondary), ), ], ), @@ -280,7 +280,7 @@ class _ToolSearchPageState extends ConsumerState { children: [ Text( e.key, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -293,7 +293,7 @@ class _ToolSearchPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: 4), child: Text( '• ${item.toString().cleanHtml}', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -302,7 +302,7 @@ class _ToolSearchPageState extends ConsumerState { if (items.length > 10) Text( '...共${items.length}条', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -319,7 +319,7 @@ class _ToolSearchPageState extends ConsumerState { width: 80, child: Text( e.key, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -328,7 +328,7 @@ class _ToolSearchPageState extends ConsumerState { Expanded( child: Text( e.value.toString().cleanHtml, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -351,7 +351,7 @@ class _ToolSearchPageState extends ConsumerState { children: [ Text( '🕐 搜索历史', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), CupertinoButton( @@ -359,7 +359,7 @@ class _ToolSearchPageState extends ConsumerState { onPressed: () => setState(() => _history.clear()), child: Text( '清空', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ], @@ -406,7 +406,7 @@ class _ToolSearchPageState extends ConsumerState { Expanded( child: Text( keyword, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), @@ -446,7 +446,7 @@ class _ToolSearchPageState extends ConsumerState { const SizedBox(width: 6), Text( '查看工具详情', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/pages/translate/translate_page.dart b/lib/features/tool_center/inspiration/presentation/pages/translate/translate_page.dart index b5e7b909..cacab183 100644 --- a/lib/features/tool_center/inspiration/presentation/pages/translate/translate_page.dart +++ b/lib/features/tool_center/inspiration/presentation/pages/translate/translate_page.dart @@ -934,7 +934,7 @@ class _TranslatePageState extends ConsumerState { size: 16, color: ext.accent), const SizedBox(width: 6), Text('翻译历史', - style: AppTypography.of(context).headline + style: AppTypography.headline .copyWith(color: ext.textPrimary)), const Spacer(), if (history.isNotEmpty) @@ -977,7 +977,7 @@ class _TranslatePageState extends ConsumerState { padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), child: CupertinoSearchTextField( placeholder: '搜索翻译记录', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), onChanged: (q) => ref.read(translateProvider.notifier).searchHistory(q), ), @@ -995,7 +995,7 @@ class _TranslatePageState extends ConsumerState { searchQuery.isEmpty ? '暂无翻译记录' : '未找到匹配记录', - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith(color: ext.textHint), ), ], @@ -1042,7 +1042,7 @@ class _TranslatePageState extends ConsumerState { const SizedBox(width: 4), Text( isUser ? '原文' : '译文', - style: AppTypography.of(context).caption2 + style: AppTypography.caption2 .copyWith( color: isUser ? ext.accent @@ -1054,7 +1054,7 @@ class _TranslatePageState extends ConsumerState { if (msg.detectedLangName != null) Text( msg.detectedLangName!, - style: AppTypography.of(context).caption2 + style: AppTypography.caption2 .copyWith( color: ext.textHint), ), @@ -1073,7 +1073,7 @@ class _TranslatePageState extends ConsumerState { const SizedBox(height: 4), Text( msg.content, - style: AppTypography.of(context).subhead + style: AppTypography.subhead .copyWith( color: ext.textPrimary, height: 1.3, diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_input_bar.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_input_bar.dart index 25867071..8055a752 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_input_bar.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_input_bar.dart @@ -131,10 +131,10 @@ class _ChatFlowInputBarState extends ConsumerState { ); }, placeholder: widget.isReadlater ? '添加链接/文字...' : '说点什么...', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), decoration: BoxDecoration( color: ext.bgSecondary, borderRadius: BorderRadius.circular(20), @@ -422,7 +422,7 @@ class _QuickCategoryBar extends StatelessWidget { child: Center( child: Text( entry.value, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isSelected ? ext.accent : ext.textSecondary, fontWeight: isSelected ? FontWeight.w600 @@ -533,7 +533,7 @@ class _PendingAttachmentItem extends StatelessWidget { attachment.fileName.length > 6 ? '${attachment.fileName.substring(0, 6)}...' : attachment.fileName, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_message_list.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_message_list.dart index 2e0ec1c0..e1bf845f 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_message_list.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_message_list.dart @@ -139,12 +139,12 @@ class ChatFlowEmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( isReadlater ? '暂无稍后读内容' : '暂无消息', - style: AppTypography.of(context).body.copyWith(color: ext.textSecondary), + style: AppTypography.body.copyWith(color: ext.textSecondary), ).animate().fadeIn(duration: 600.ms), const SizedBox(height: AppSpacing.xs), Text( isReadlater ? '收藏内容,稍后阅读 📖' : '发送一条消息开始对话吧', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ).animate().fadeIn(duration: 600.ms, delay: 200.ms), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_readlater_mixin.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_readlater_mixin.dart index f34d7efe..cacbde46 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_readlater_mixin.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_readlater_mixin.dart @@ -165,7 +165,7 @@ class ChatFlowReadlaterHelper { ], message: Text( '📊 共 $totalCount 条 · 已读 $readCount · 未读 $unreadCount', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), ), cancelButton: CupertinoActionSheetAction( onPressed: () => Navigator.pop(ctx), @@ -206,7 +206,7 @@ class ChatFlowReadlaterHelper { children: [ Text( '🏷️ 标签管理', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.bold, ), ), @@ -228,9 +228,9 @@ class ChatFlowReadlaterHelper { children: [ const Text('🏷️', style: TextStyle(fontSize: 40)), const SizedBox(height: 8), - Text('暂无标签', style: AppTypography.of(context).footnote), + Text('暂无标签', style: AppTypography.footnote), const SizedBox(height: 4), - Text('点击右上角添加标签', style: AppTypography.of(context).caption1), + Text('点击右上角添加标签', style: AppTypography.caption1), ], ), ), @@ -384,7 +384,7 @@ class ChatFlowReadlaterHelper { children: [ Text( '📁 文件夹管理', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.bold, ), ), @@ -406,9 +406,9 @@ class ChatFlowReadlaterHelper { children: [ const Text('📁', style: TextStyle(fontSize: 40)), const SizedBox(height: 8), - Text('暂无文件夹', style: AppTypography.of(context).footnote), + Text('暂无文件夹', style: AppTypography.footnote), const SizedBox(height: 4), - Text('点击右上角创建文件夹', style: AppTypography.of(context).caption1), + Text('点击右上角创建文件夹', style: AppTypography.caption1), ], ), ), @@ -640,7 +640,7 @@ class ChatFlowReadlaterHelper { children: [ Text( '👥 共享协作', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.bold, ), ), @@ -661,9 +661,9 @@ class ChatFlowReadlaterHelper { children: [ const Text('👥', style: TextStyle(fontSize: 40)), const SizedBox(height: 8), - Text('暂无共享列表', style: AppTypography.of(context).footnote), + Text('暂无共享列表', style: AppTypography.footnote), const SizedBox(height: 4), - Text('创建共享列表与好友协作', style: AppTypography.of(context).caption1), + Text('创建共享列表与好友协作', style: AppTypography.caption1), ], ), ), @@ -990,7 +990,7 @@ class ChatFlowReadlaterHelper { const SizedBox(height: 8), Text( '已有标签: ${message.getTags.join(", ")}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.secondaryLabel.resolveFrom(context), ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_send_toast.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_send_toast.dart index a7b62f7f..dd00674b 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_send_toast.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_send_toast.dart @@ -93,7 +93,7 @@ class _SendToastWidgetState extends State children: [ Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontSize: 13, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_top_bar.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_top_bar.dart index a625ae4c..5323d34e 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_top_bar.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_flow_top_bar.dart @@ -64,8 +64,8 @@ class ChatFlowSearchBar extends ConsumerWidget { onChanged: onChanged, onSubmitted: (_) {}, placeholder: '🔍 搜索消息内容、作者、链接...', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), - placeholderStyle: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), decoration: BoxDecoration( @@ -95,7 +95,7 @@ class ChatFlowSearchBar extends ConsumerWidget { ), child: Text( '$resultCount/$totalCount', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -185,7 +185,7 @@ class ChatFlowCategoryBar extends ConsumerWidget { child: Center( child: Text( entry.value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, color: isSelected ? ext.accent : ext.textSecondary, @@ -211,7 +211,7 @@ class ChatFlowCategoryBar extends ConsumerWidget { child: Center( child: Text( showAll ? '收起 ▲' : '展开 ▼', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_rich_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_rich_bubble.dart index aef2d5da..3922327a 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_rich_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat/chat_rich_bubble.dart @@ -66,7 +66,7 @@ class ChatRichBubble extends StatelessWidget { message.text.length > 60 ? '${message.text.substring(0, 60)}...' : message.text, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: isMe ? Colors.white.withValues(alpha: 0.6) : ext.textHint, @@ -116,35 +116,35 @@ class ChatRichBubble extends StatelessWidget { return quill.DefaultStyles( paragraph: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith(color: textColor), + AppTypography.body.copyWith(color: textColor), const quill.HorizontalSpacing(0, 2), quill.VerticalSpacing.zero, quill.VerticalSpacing.zero, null, ), h1: quill.DefaultTextBlockStyle( - AppTypography.of(context).headline.copyWith(color: textColor), + AppTypography.headline.copyWith(color: textColor), const quill.HorizontalSpacing(0, 4), quill.VerticalSpacing.zero, quill.VerticalSpacing.zero, null, ), h2: quill.DefaultTextBlockStyle( - AppTypography.of(context).title2.copyWith(color: textColor), + AppTypography.title2.copyWith(color: textColor), const quill.HorizontalSpacing(0, 4), quill.VerticalSpacing.zero, quill.VerticalSpacing.zero, null, ), h3: quill.DefaultTextBlockStyle( - AppTypography.of(context).title3.copyWith(color: textColor), + AppTypography.title3.copyWith(color: textColor), const quill.HorizontalSpacing(0, 2), quill.VerticalSpacing.zero, quill.VerticalSpacing.zero, null, ), quote: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith(color: secondaryColor), + AppTypography.body.copyWith(color: secondaryColor), const quill.HorizontalSpacing(0, 4), quill.VerticalSpacing.zero, const quill.VerticalSpacing(6, 2), @@ -158,7 +158,7 @@ class ChatRichBubble extends StatelessWidget { ), ), code: quill.DefaultTextBlockStyle( - AppTypography.of(context).caption1.copyWith(color: textColor, fontFamily: 'Menlo'), + AppTypography.caption1.copyWith(color: textColor, fontFamily: 'Menlo'), const quill.HorizontalSpacing(0, 2), const quill.VerticalSpacing(4, 4), quill.VerticalSpacing.zero, @@ -167,7 +167,7 @@ class ChatRichBubble extends StatelessWidget { borderRadius: BorderRadius.circular(4), ), ), - link: AppTypography.of(context).body.copyWith( + link: AppTypography.body.copyWith( color: ext.accent, decoration: TextDecoration.underline, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_audio_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_audio_bubble.dart index 72a442d9..08b8aaed 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_audio_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_audio_bubble.dart @@ -130,7 +130,7 @@ class _ChatAudioBubbleState extends State { const SizedBox(width: AppSpacing.sm), Text( durationText, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_bubble.dart index 43822209..9e88edc7 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_bubble.dart @@ -598,13 +598,13 @@ class _ChatBubbleState extends State { children: [ Text( attachment.fileName, - style: AppTypography.of(context).subhead.copyWith(color: textColor), + style: AppTypography.subhead.copyWith(color: textColor), maxLines: 1, overflow: TextOverflow.ellipsis, ), Text( attachment.displaySize, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: textColor.withValues(alpha: 0.6), ), ), @@ -629,7 +629,7 @@ class _ChatBubbleState extends State { const SizedBox(height: 4), Text( attachment.displaySize, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -671,7 +671,7 @@ class _ChatBubbleState extends State { .map( (p) => Text( p, - style: AppTypography.of(context).caption2.copyWith(color: metaColor), + style: AppTypography.caption2.copyWith(color: metaColor), ), ) .toList(), @@ -713,7 +713,7 @@ class _ChatBubbleState extends State { ), child: Text( '$emoji $cat', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: labelColor, fontSize: 10, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_document_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_document_bubble.dart index af8fde13..516d6f72 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_document_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_document_bubble.dart @@ -145,7 +145,7 @@ class ChatDocumentBubble extends StatelessWidget { children: [ Text( fileName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -158,7 +158,7 @@ class ChatDocumentBubble extends StatelessWidget { children: [ Text( fileSize, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -174,7 +174,7 @@ class ChatDocumentBubble extends StatelessWidget { ), child: Text( config.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: config.color, fontWeight: FontWeight.w600, ), @@ -282,7 +282,7 @@ class _ActionButton extends StatelessWidget { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_file_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_file_bubble.dart index 17e68b51..d5bcb78f 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_file_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_file_bubble.dart @@ -62,7 +62,7 @@ class ChatFileBubble extends StatelessWidget { children: [ Text( fileName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), maxLines: 1, @@ -71,7 +71,7 @@ class ChatFileBubble extends StatelessWidget { const SizedBox(height: 2), Text( '$fileSize · ${_fileTypeLabel(fileType)}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_image_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_image_bubble.dart index 8d9d5208..b0b2596c 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_image_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_image_bubble.dart @@ -89,7 +89,7 @@ class _ChatImageBubbleState extends State { ), child: Text( '${width}×$height', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: widget.ext.textInverse, fontSize: 9, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_link_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_link_bubble.dart index c1842f26..dd3f295d 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_link_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_link_bubble.dart @@ -169,7 +169,7 @@ class _ChatLinkBubbleState extends State { siteLabel != null && siteLabel.isNotEmpty ? '链接 · $siteLabel' : '链接', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.accent, fontWeight: FontWeight.w600, ), @@ -236,7 +236,7 @@ class _ChatLinkBubbleState extends State { const SizedBox(height: AppSpacing.xs), Text( '正在获取预览...', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: widget.ext.textHint, ), ), @@ -269,7 +269,7 @@ class _ChatLinkBubbleState extends State { child: Center( child: Text( letter, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: widget.ext.accent, fontWeight: FontWeight.w700, fontSize: 18, @@ -281,7 +281,7 @@ class _ChatLinkBubbleState extends State { Expanded( child: Text( domain, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: widget.ext.textSecondary, ), maxLines: 1, @@ -304,7 +304,7 @@ class _ChatLinkBubbleState extends State { ), child: Text( title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: widget.ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -325,7 +325,7 @@ class _ChatLinkBubbleState extends State { ), child: Text( description, - style: AppTypography.of(context).subhead.copyWith(color: widget.ext.textSecondary), + style: AppTypography.subhead.copyWith(color: widget.ext.textSecondary), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -348,7 +348,7 @@ class _ChatLinkBubbleState extends State { Expanded( child: Text( domain, - style: AppTypography.of(context).footnote.copyWith(color: widget.ext.accent), + style: AppTypography.footnote.copyWith(color: widget.ext.accent), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -409,7 +409,7 @@ class _ChatLinkBubbleState extends State { const SizedBox(width: 4), Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.ext.accent, fontWeight: FontWeight.w500, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_sentence_card_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_sentence_card_bubble.dart index fa829880..b3221cba 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_sentence_card_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_sentence_card_bubble.dart @@ -122,7 +122,7 @@ class ChatSentenceCardBubble extends StatelessWidget { ), child: Text( '💬 发现句子', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Colors.white, fontWeight: FontWeight.w600, ), @@ -141,7 +141,7 @@ class ChatSentenceCardBubble extends StatelessWidget { ), child: Text( feedName, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: Colors.white.withValues(alpha: 0.9), ), ), @@ -167,7 +167,7 @@ class ChatSentenceCardBubble extends StatelessWidget { Widget _buildSentenceContent() { return Text( message.text, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: Colors.white, height: 1.7, ), @@ -182,7 +182,7 @@ class ChatSentenceCardBubble extends StatelessWidget { padding: const EdgeInsets.only(top: AppSpacing.sm), child: Text( '—— ${message.author!}', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: Colors.white.withValues(alpha: 0.75), ), ), @@ -200,7 +200,7 @@ class ChatSentenceCardBubble extends StatelessWidget { Flexible( child: Text( message.source!, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Colors.white.withValues(alpha: 0.6), ), maxLines: 1, @@ -233,7 +233,7 @@ class ChatSentenceCardBubble extends StatelessWidget { const SizedBox(width: 2), Text( '$count', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: Colors.white.withValues(alpha: 0.7), ), ), @@ -282,7 +282,7 @@ class ChatSentenceCardBubble extends StatelessWidget { ), child: Text( label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Colors.white.withValues(alpha: 0.9), fontWeight: FontWeight.w500, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_video_bubble.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_video_bubble.dart index 55845bc8..015f471f 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_video_bubble.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_bubble/chat_video_bubble.dart @@ -136,7 +136,7 @@ class _ChatVideoBubbleState extends State { const SizedBox(height: AppSpacing.xs), Text( '压缩中 ${(_compressProgress * 100).toInt()}%', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, ), ), @@ -168,7 +168,7 @@ class _ChatVideoBubbleState extends State { if (durationMs != null) Text( _formatDuration(durationMs), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontSize: 10, ), @@ -176,7 +176,7 @@ class _ChatVideoBubbleState extends State { if (width != null && height != null) Text( '${width}p', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontSize: 10, ), @@ -385,7 +385,7 @@ class _VideoPlayerPageState extends State<_VideoPlayerPage> { const SizedBox(height: 12), Text( '视频无法播放', - style: AppTypography.of(context).body.copyWith(color: CupertinoColors.white), + style: AppTypography.body.copyWith(color: CupertinoColors.white), ), ], ); diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/attachment_grid_sheet.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/attachment_grid_sheet.dart index d73d3380..29442ee5 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/attachment_grid_sheet.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/attachment_grid_sheet.dart @@ -132,7 +132,7 @@ class _GridCell extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( item.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: item.isEnabled ? ext.textSecondary : ext.textDisabled, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/record_audio_sheet.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/record_audio_sheet.dart index eeba52d1..db428221 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/record_audio_sheet.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/record_audio_sheet.dart @@ -131,7 +131,7 @@ class _RecordAudioSheetState extends State { const SizedBox(height: AppSpacing.md), Text( '🎙️ 录音', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, ), ), @@ -140,7 +140,7 @@ class _RecordAudioSheetState extends State { const SizedBox(height: AppSpacing.md), Text( ChatAudioService.formatDuration(_duration), - style: AppTypography.of(context).title2.copyWith( + style: AppTypography.title2.copyWith( color: ext.textSecondary, ), ), @@ -152,7 +152,7 @@ class _RecordAudioSheetState extends State { onPressed: _cancel, child: Text( '取消', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/reply_preview_bar.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/reply_preview_bar.dart index 9682af83..b8ed3dbf 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/reply_preview_bar.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/reply_preview_bar.dart @@ -57,7 +57,7 @@ class ReplyPreviewBar extends StatelessWidget { children: [ Text( message.isUser ? '你' : (message.author ?? 'AI'), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -67,7 +67,7 @@ class ReplyPreviewBar extends StatelessWidget { message.text.length > 40 ? '${message.text.substring(0, 40)}...' : message.text, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), maxLines: 1, @@ -130,7 +130,7 @@ class ReplyQuoteCard extends StatelessWidget { children: [ Text( message.isUser ? '你' : (message.author ?? 'AI'), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -140,7 +140,7 @@ class ReplyQuoteCard extends StatelessWidget { message.text.length > 60 ? '${message.text.substring(0, 60)}...' : message.text, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 2, diff --git a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/rich_text_editor_sheet.dart b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/rich_text_editor_sheet.dart index 93d140dd..d55aae8a 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/chat_input/rich_text_editor_sheet.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/chat_input/rich_text_editor_sheet.dart @@ -94,18 +94,18 @@ class _RichTextEditorSheetState extends State { onPressed: () => Navigator.pop(context), child: Text( '取消', - style: AppTypography.of(context).body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textHint), ), ), Text( '✏️ 富文本编辑', - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary), + style: AppTypography.headline.copyWith(color: ext.textPrimary), ), CupertinoButton( onPressed: _send, child: Text( '发送', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -158,14 +158,14 @@ class _RichTextEditorSheetState extends State { padding: const EdgeInsets.all(AppSpacing.sm), customStyles: quill.DefaultStyles( paragraph: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith(color: ext.textPrimary), + AppTypography.body.copyWith(color: ext.textPrimary), const quill.HorizontalSpacing(0, 0), quill.VerticalSpacing.zero, quill.VerticalSpacing.zero, null, ), quote: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith( + AppTypography.body.copyWith( color: ext.textSecondary, fontStyle: FontStyle.italic, ), @@ -182,7 +182,7 @@ class _RichTextEditorSheetState extends State { ), ), code: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith( + AppTypography.body.copyWith( color: ext.accent, fontFamily: 'Menlo', fontSize: 13, @@ -197,7 +197,7 @@ class _RichTextEditorSheetState extends State { ), ), lists: quill.DefaultListBlockStyle( - AppTypography.of(context).body.copyWith(color: ext.textPrimary), + AppTypography.body.copyWith(color: ext.textPrimary), const quill.HorizontalSpacing(0, 0), const quill.VerticalSpacing(6, 0), const quill.VerticalSpacing(0, 6), @@ -209,7 +209,7 @@ class _RichTextEditorSheetState extends State { decoration: TextDecoration.underline, ), placeHolder: quill.DefaultTextBlockStyle( - AppTypography.of(context).body.copyWith( + AppTypography.body.copyWith( color: ext.textHint, fontSize: 16, height: 1.5, diff --git a/lib/features/tool_center/inspiration/presentation/widgets/common/ip_detail_sheet.dart b/lib/features/tool_center/inspiration/presentation/widgets/common/ip_detail_sheet.dart index 4b3a2612..27cbae28 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/common/ip_detail_sheet.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/common/ip_detail_sheet.dart @@ -77,7 +77,7 @@ class IpDetailSheet extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( '📍 IP地址详情', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.accent, ), ), @@ -115,7 +115,7 @@ class IpDetailSheet extends StatelessWidget { width: 80, child: Text( label, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, ), ), @@ -123,7 +123,7 @@ class IpDetailSheet extends StatelessWidget { Expanded( child: Text( value, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/session/session_popup_menu.dart b/lib/features/tool_center/inspiration/presentation/widgets/session/session_popup_menu.dart index 94d82594..5ec40d68 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/session/session_popup_menu.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/session/session_popup_menu.dart @@ -37,7 +37,7 @@ void showSessionContextMenu({ Flexible( child: Text( session.displayName, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( fontWeight: FontWeight.w600, ), maxLines: 1, @@ -48,7 +48,7 @@ void showSessionContextMenu({ ), message: Text( session.lastMessage, - style: AppTypography.of(context).subhead, + style: AppTypography.subhead, maxLines: 2, overflow: TextOverflow.ellipsis, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/session/session_row.dart b/lib/features/tool_center/inspiration/presentation/widgets/session/session_row.dart index 2c062fd0..b8cb2460 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/session/session_row.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/session/session_row.dart @@ -224,7 +224,7 @@ class SessionRow extends StatelessWidget { Flexible( child: Text( session.displayName, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -242,7 +242,7 @@ class SessionRow extends StatelessWidget { ), child: Text( session.tag!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemRed, fontWeight: FontWeight.w700, ), @@ -262,7 +262,7 @@ class SessionRow extends StatelessWidget { const SizedBox(height: 3), Text( session.lastMessage, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -277,7 +277,7 @@ class SessionRow extends StatelessWidget { children: [ Text( session.displayTime, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: session.unreadCount > 0 ? ext.accent : ext.textHint, fontWeight: session.unreadCount > 0 ? FontWeight.w600 diff --git a/lib/features/tool_center/inspiration/presentation/widgets/session/session_search_bar.dart b/lib/features/tool_center/inspiration/presentation/widgets/session/session_search_bar.dart index 4bc138f0..4e8d7f34 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/session/session_search_bar.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/session/session_search_bar.dart @@ -120,10 +120,10 @@ class _SessionSearchBarState extends ConsumerState { controller: _controller, focusNode: _focusNode, placeholder: '搜索会话或内容…', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), decoration: const BoxDecoration(), @@ -167,7 +167,7 @@ class _SessionSearchBarState extends ConsumerState { const SizedBox(height: AppSpacing.sm), Text( '未找到相关内容', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), ), ], ), @@ -234,7 +234,7 @@ class _SessionSearchBarState extends ConsumerState { children: [ Text( title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -242,7 +242,7 @@ class _SessionSearchBarState extends ConsumerState { const SizedBox(width: 4), Text( '$count', - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -287,7 +287,7 @@ class _SessionSearchBarState extends ConsumerState { children: [ Text( session.displayName, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: matchInName ? ext.accent : ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -297,7 +297,7 @@ class _SessionSearchBarState extends ConsumerState { const SizedBox(height: 2), Text( session.lastMessage, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -354,7 +354,7 @@ class _SessionSearchBarState extends ConsumerState { children: [ Text( result.sessionName, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -363,7 +363,7 @@ class _SessionSearchBarState extends ConsumerState { if (msg.author != null) Text( '· ${msg.author}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), maxLines: 1, @@ -378,7 +378,7 @@ class _SessionSearchBarState extends ConsumerState { ), Text( msg.displayTime, - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ), @@ -393,7 +393,7 @@ class _SessionSearchBarState extends ConsumerState { if (query.isEmpty) { return Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 2, overflow: TextOverflow.ellipsis, ); @@ -404,7 +404,7 @@ class _SessionSearchBarState extends ConsumerState { if (index < 0) { return Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 2, overflow: TextOverflow.ellipsis, ); @@ -423,12 +423,12 @@ class _SessionSearchBarState extends ConsumerState { maxLines: 2, overflow: TextOverflow.ellipsis, text: TextSpan( - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), children: [ TextSpan(text: truncatedBefore), TextSpan( text: match, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_grid_item.dart b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_grid_item.dart index 23087a53..22b1e71c 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_grid_item.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_grid_item.dart @@ -183,7 +183,7 @@ class _ToolGridItemState extends State const SizedBox(height: 4), Text( widget.tool.name, - style: AppTypography.of(context).caption2.copyWith(color: ext.textPrimary), + style: AppTypography.caption2.copyWith(color: ext.textPrimary), textAlign: TextAlign.center, maxLines: 1, overflow: TextOverflow.ellipsis, diff --git a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recent_section.dart b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recent_section.dart index aaccc3e4..1181c898 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recent_section.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recent_section.dart @@ -45,7 +45,7 @@ class ToolRecentSection extends StatelessWidget { children: [ Text( '🕐 最近使用', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -56,7 +56,7 @@ class ToolRecentSection extends StatelessWidget { padding: const EdgeInsets.symmetric(vertical: AppSpacing.md), child: Text( '开始使用工具吧 💡', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -76,7 +76,7 @@ class ToolRecentSection extends StatelessWidget { children: [ Text( '🕐 最近使用', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -86,7 +86,7 @@ class ToolRecentSection extends StatelessWidget { onTap: onViewAll, child: Text( '查看全部 →', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -180,14 +180,14 @@ class _RecentCard extends StatelessWidget { children: [ Text( tool.name, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( '${tool.useCount} 次', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 9, ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recommend_section.dart b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recommend_section.dart index 422527f0..c76e730e 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recommend_section.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_recommend_section.dart @@ -47,7 +47,7 @@ class ToolRecommendSection extends StatelessWidget { children: [ Text( '⭐ 推荐工具', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -60,7 +60,7 @@ class ToolRecommendSection extends StatelessWidget { children: [ Text( '换一批', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), diff --git a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_search_bar.dart b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_search_bar.dart index d1780c5a..2d5c5928 100644 --- a/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_search_bar.dart +++ b/lib/features/tool_center/inspiration/presentation/widgets/tool/tool_search_bar.dart @@ -101,10 +101,10 @@ class _ToolSearchBarState extends State { controller: _controller, focusNode: _focusNode, placeholder: '🔍 搜索工具…', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm, @@ -146,7 +146,7 @@ class _ToolSearchBarState extends State { children: [ Text( '搜索历史', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -155,7 +155,7 @@ class _ToolSearchBarState extends State { onTap: widget.onClearHistory, child: Text( '清空', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, ), ), @@ -179,7 +179,7 @@ class _ToolSearchBarState extends State { ), child: Text( q, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), diff --git a/lib/features/tool_center/knowledge_graph/presentation/knowledge_graph_page.dart b/lib/features/tool_center/knowledge_graph/presentation/knowledge_graph_page.dart index 2074d2ed..ed3f2653 100644 --- a/lib/features/tool_center/knowledge_graph/presentation/knowledge_graph_page.dart +++ b/lib/features/tool_center/knowledge_graph/presentation/knowledge_graph_page.dart @@ -52,7 +52,7 @@ class _KnowledgeGraphPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '🕸️ 知识图谱', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgElevated.withValues(alpha: 0.85), border: null, @@ -112,7 +112,7 @@ class _KnowledgeGraphPageState extends ConsumerState { const SizedBox(width: 4), Text( node.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: Color(node.type.colorValue), fontWeight: FontWeight.w600, ), @@ -138,12 +138,12 @@ class _KnowledgeGraphPageState extends ConsumerState { const SizedBox(height: AppSpacing.lg), Text( '探索知识关联', - style: AppTypography.of(context).title2.copyWith(color: ext.textPrimary), + style: AppTypography.title2.copyWith(color: ext.textPrimary), ), const SizedBox(height: AppSpacing.sm), Text( '搜索关键词或选择预设节点\n发现诗词、作者、主题之间的联系', - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), textAlign: TextAlign.center, ), const SizedBox(height: AppSpacing.xl), @@ -151,7 +151,7 @@ class _KnowledgeGraphPageState extends ConsumerState { onPressed: () => _showSearchDialog(ext), child: Text( '🔍 开始探索', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -254,7 +254,7 @@ class _KnowledgeGraphPageState extends ConsumerState { ), child: Text( '${state.nodes.length} 节点 · ${state.edges.length} 关联', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontSize: 11, ), @@ -314,14 +314,14 @@ class _KnowledgeGraphPageState extends ConsumerState { children: [ Text( node.name, - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( '${node.type.label} · ${node.description.isNotEmpty ? node.description : '点击扩展查看更多关联'}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), maxLines: 1, @@ -346,7 +346,7 @@ class _KnowledgeGraphPageState extends ConsumerState { ), child: Text( '扩展 🔗', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -392,7 +392,7 @@ class _KnowledgeGraphPageState extends ConsumerState { children: [ Text( item.title, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -402,7 +402,7 @@ class _KnowledgeGraphPageState extends ConsumerState { const SizedBox(height: 2), Text( item.author, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, fontSize: 11, ), @@ -411,7 +411,7 @@ class _KnowledgeGraphPageState extends ConsumerState { const Spacer(), Text( item.content.substring(0, item.content.length.clamp(0, 30)), - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, fontSize: 10, fontStyle: FontStyle.italic, @@ -449,7 +449,7 @@ class _KnowledgeGraphPageState extends ConsumerState { CupertinoSearchTextField( controller: _searchController, placeholder: '搜索诗词、作者、主题…', - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), onSubmitted: (value) { Navigator.pop(context); if (value.trim().isNotEmpty) { diff --git a/lib/features/tool_center/statistics/presentation/statistics_page.dart b/lib/features/tool_center/statistics/presentation/statistics_page.dart index 44feaefa..c45d43a2 100644 --- a/lib/features/tool_center/statistics/presentation/statistics_page.dart +++ b/lib/features/tool_center/statistics/presentation/statistics_page.dart @@ -219,7 +219,7 @@ class _StatisticsPageState extends ConsumerState { Expanded( child: Text( state.error!, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: CupertinoColors.systemOrange, ), ), @@ -328,7 +328,7 @@ class _EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '暂无统计数据', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -336,7 +336,7 @@ class _EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '开始使用后,这里将展示你的学习数据', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], @@ -370,7 +370,7 @@ class _ErrorState extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '数据加载失败', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -380,7 +380,7 @@ class _ErrorState extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.xl), child: Text( error, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, maxLines: 3, overflow: TextOverflow.ellipsis, @@ -406,7 +406,7 @@ class _ErrorState extends StatelessWidget { const SizedBox(width: 6), Text( '重新加载', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -454,7 +454,7 @@ class _CacheHintBanner extends StatelessWidget { Expanded( child: Text( '当前显示缓存数据,下拉刷新获取最新数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemOrange, ), ), @@ -510,7 +510,7 @@ class _OverviewHero extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '站点总览', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -539,7 +539,7 @@ class _OverviewHero extends StatelessWidget { const SizedBox(width: 4), Text( '运行中', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -631,7 +631,7 @@ class _OverviewChip extends StatelessWidget { const SizedBox(height: AppSpacing.sm), AnimatedCounter( value: intValue, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w800, ), @@ -639,7 +639,7 @@ class _OverviewChip extends StatelessWidget { const SizedBox(height: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), @@ -681,7 +681,7 @@ class _TodayDynamic extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '今日动态', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -750,14 +750,14 @@ class _TodayChip extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.accent, fontWeight: FontWeight.w800, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), @@ -805,7 +805,7 @@ class _UserDataSection extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '我的数据', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -822,7 +822,7 @@ class _UserDataSection extends StatelessWidget { ), child: Text( title, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -923,14 +923,14 @@ class _ProgressRing extends StatelessWidget { children: [ Text( '$score', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.accent, fontWeight: FontWeight.w800, ), ), Text( '积分', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -1011,12 +1011,12 @@ class _UserStatRow extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), Text( value, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1063,7 +1063,7 @@ class _SigninTrendChart extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '签到趋势', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1104,7 +1104,7 @@ class _SigninTrendChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (value, meta) => Text( '${value.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -1121,7 +1121,7 @@ class _SigninTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -1166,7 +1166,7 @@ class _SigninTrendChart extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()} 次', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -1281,7 +1281,7 @@ class _MiniBadge extends StatelessWidget { const SizedBox(width: 3), Text( value, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -1289,7 +1289,7 @@ class _MiniBadge extends StatelessWidget { const SizedBox(width: 2), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -1349,7 +1349,7 @@ class _CoinBarChart extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '金币统计', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1368,7 +1368,7 @@ class _CoinBarChart extends StatelessWidget { tooltipBorderRadius: BorderRadius.circular(8), getTooltipItem: (group, _, rod, __) => BarTooltipItem( '${rod.toY.toInt()}', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -1382,7 +1382,7 @@ class _CoinBarChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (value, meta) => Text( '${value.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -1399,7 +1399,7 @@ class _CoinBarChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( bars[idx].label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -1482,7 +1482,7 @@ class _ContentPieChart extends StatelessWidget { color: ext.accent, title: '正常\n$normalNotes', radius: 50, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -1492,7 +1492,7 @@ class _ContentPieChart extends StatelessWidget { color: const Color(0xFF4ECDC4), title: '今日\n$todayNotes', radius: 45, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -1503,7 +1503,7 @@ class _ContentPieChart extends StatelessWidget { color: const Color(0xFFFFE66D), title: '其他\n${otherNotes.toInt()}', radius: 40, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.black, fontWeight: FontWeight.w600, ), @@ -1515,7 +1515,7 @@ class _ContentPieChart extends StatelessWidget { color: ext.bgSecondary, title: '暂无数据', radius: 50, - titleStyle: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + titleStyle: AppTypography.caption2.copyWith(color: ext.textHint), ), ]; @@ -1538,7 +1538,7 @@ class _ContentPieChart extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '笔记分布', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1546,7 +1546,7 @@ class _ContentPieChart extends StatelessWidget { const Spacer(), Text( '共 $totalNotes 篇', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), @@ -1610,7 +1610,7 @@ class _UserGrowthChart extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '用户统计', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -1719,14 +1719,14 @@ class _GrowthCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w800, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), ], ), diff --git a/lib/features/tool_center/statistics/presentation/user_stats_page.dart b/lib/features/tool_center/statistics/presentation/user_stats_page.dart index bb1f3f18..171754ef 100644 --- a/lib/features/tool_center/statistics/presentation/user_stats_page.dart +++ b/lib/features/tool_center/statistics/presentation/user_stats_page.dart @@ -111,7 +111,7 @@ class _UserStatsPageState extends ConsumerState { const SizedBox(width: 4), Text( '学习', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _currentTab == 0 ? ext.accent : ext.textSecondary, fontWeight: _currentTab == 0 ? FontWeight.w600 @@ -130,7 +130,7 @@ class _UserStatsPageState extends ConsumerState { const SizedBox(width: 4), Text( '积分', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _currentTab == 1 ? ext.accent : ext.textSecondary, fontWeight: _currentTab == 1 ? FontWeight.w600 @@ -149,7 +149,7 @@ class _UserStatsPageState extends ConsumerState { const SizedBox(width: 4), Text( '收藏', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: _currentTab == 2 ? ext.accent : ext.textSecondary, fontWeight: _currentTab == 2 ? FontWeight.w600 diff --git a/lib/features/tool_center/statistics/presentation/widgets/coin_stats_tab.dart b/lib/features/tool_center/statistics/presentation/widgets/coin_stats_tab.dart index b245677a..fda77acc 100644 --- a/lib/features/tool_center/statistics/presentation/widgets/coin_stats_tab.dart +++ b/lib/features/tool_center/statistics/presentation/widgets/coin_stats_tab.dart @@ -141,7 +141,7 @@ class CoinTrendChart extends StatelessWidget { ext: ext, badge: Text( '近30日', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -165,7 +165,7 @@ class CoinTrendChart extends StatelessWidget { reservedSize: 32, getTitlesWidget: (v, _) => Text( '${v.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -185,7 +185,7 @@ class CoinTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -224,7 +224,7 @@ class CoinTrendChart extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()} 💰', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -307,7 +307,7 @@ class CoinSourceBarChart extends StatelessWidget { tooltipBorderRadius: BorderRadius.circular(8), getTooltipItem: (group, _, rod, __) => BarTooltipItem( '${rod.toY.toInt()}', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -321,7 +321,7 @@ class CoinSourceBarChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (v, _) => Text( '${v.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -338,7 +338,7 @@ class CoinSourceBarChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( items[idx].source, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -411,7 +411,7 @@ class CoinRingChart extends StatelessWidget { color: const Color(0xFF4ECDC4), title: '收入\n$income', radius: 50, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -421,7 +421,7 @@ class CoinRingChart extends StatelessWidget { color: const Color(0xFFFF6B6B), title: '支出\n$expense', radius: 45, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -433,7 +433,7 @@ class CoinRingChart extends StatelessWidget { color: ext.bgSecondary, title: '暂无数据', radius: 50, - titleStyle: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + titleStyle: AppTypography.caption2.copyWith(color: ext.textHint), ), ]; @@ -500,14 +500,14 @@ class CoinRingChart extends StatelessWidget { const SizedBox(width: 6), Text( '余额', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), const Spacer(), Text( '${o.balance}', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.accent, fontWeight: FontWeight.w800, ), diff --git a/lib/features/tool_center/statistics/presentation/widgets/favorite_stats_tab.dart b/lib/features/tool_center/statistics/presentation/widgets/favorite_stats_tab.dart index 0323ebf9..4535761b 100644 --- a/lib/features/tool_center/statistics/presentation/widgets/favorite_stats_tab.dart +++ b/lib/features/tool_center/statistics/presentation/widgets/favorite_stats_tab.dart @@ -125,7 +125,7 @@ class FavoriteCategoryPie extends StatelessWidget { ? '${(e.value.count / total * 100).toStringAsFixed(0)}%' : '', radius: 45, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -186,14 +186,14 @@ class FavoriteCategoryPie extends StatelessWidget { Expanded( child: Text( e.value.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), ), Text( '${e.value.count}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -260,7 +260,7 @@ class FavoriteTrendChart extends StatelessWidget { ext: ext, badge: Text( '近7日', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -284,7 +284,7 @@ class FavoriteTrendChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (v, _) => Text( '${v.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -301,7 +301,7 @@ class FavoriteTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -347,7 +347,7 @@ class FavoriteTrendChart extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()} ❤️', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -421,7 +421,7 @@ class FavoriteGroupBarChart extends StatelessWidget { tooltipBorderRadius: BorderRadius.circular(8), getTooltipItem: (group, _, rod, __) => BarTooltipItem( '${rod.toY.toInt()}', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -435,7 +435,7 @@ class FavoriteGroupBarChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (v, _) => Text( '${v.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -452,7 +452,7 @@ class FavoriteGroupBarChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( items[idx].group, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), diff --git a/lib/features/tool_center/statistics/presentation/widgets/learning_stats_tab.dart b/lib/features/tool_center/statistics/presentation/widgets/learning_stats_tab.dart index f0141885..77d49ca6 100644 --- a/lib/features/tool_center/statistics/presentation/widgets/learning_stats_tab.dart +++ b/lib/features/tool_center/statistics/presentation/widgets/learning_stats_tab.dart @@ -159,7 +159,7 @@ class LearningTrendChart extends StatelessWidget { ext: ext, badge: Text( '近7日', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -192,7 +192,7 @@ class LearningTrendChart extends StatelessWidget { reservedSize: 28, getTitlesWidget: (v, _) => Text( '${v.toInt()}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -209,7 +209,7 @@ class LearningTrendChart extends StatelessWidget { padding: const EdgeInsets.only(top: 6), child: Text( dayLabels[idx], - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -235,7 +235,7 @@ class LearningTrendChart extends StatelessWidget { .map( (s) => LineTooltipItem( '${s.y.toInt()}', - AppTypography.of(context).caption1.copyWith( + AppTypography.caption1.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -320,7 +320,7 @@ class CategoryPieChart extends StatelessWidget { ? '${(e.value.count / total * 100).toStringAsFixed(0)}%' : '', radius: 45, - titleStyle: AppTypography.of(context).caption2.copyWith( + titleStyle: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -381,14 +381,14 @@ class CategoryPieChart extends StatelessWidget { Expanded( child: Text( e.value.name, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textSecondary, ), ), ), Text( '${e.value.count}', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -441,7 +441,7 @@ class HeatmapGrid extends StatelessWidget { ext: ext, badge: Text( '${DateTime.now().year}', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, ), ), @@ -489,7 +489,7 @@ class HeatmapGrid extends StatelessWidget { height: 13, child: Text( l, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 8, ), @@ -506,7 +506,7 @@ class HeatmapGrid extends StatelessWidget { children: [ Text( '少', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), @@ -528,7 +528,7 @@ class HeatmapGrid extends StatelessWidget { const SizedBox(width: 4), Text( '多', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textHint, fontSize: 10, ), diff --git a/lib/features/tool_center/statistics/presentation/widgets/stats_shared.dart b/lib/features/tool_center/statistics/presentation/widgets/stats_shared.dart index 351b118f..98cf3090 100644 --- a/lib/features/tool_center/statistics/presentation/widgets/stats_shared.dart +++ b/lib/features/tool_center/statistics/presentation/widgets/stats_shared.dart @@ -49,7 +49,7 @@ class SectionHeader extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( title, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -96,7 +96,7 @@ class ChartLegend extends StatelessWidget { const SizedBox(width: 4), Text( l.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 10, ), @@ -138,12 +138,12 @@ class LegendItemRow extends StatelessWidget { const SizedBox(width: 8), Text( label, - style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary), + style: AppTypography.subhead.copyWith(color: ext.textSecondary), ), const Spacer(), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -189,19 +189,19 @@ class StatCard extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( value, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w800, ), ), Text( label, - style: AppTypography.of(context).caption2.copyWith(color: ext.textSecondary), + style: AppTypography.caption2.copyWith(color: ext.textSecondary), ), const SizedBox(height: 2), Text( subValue, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontSize: 10, ), @@ -277,7 +277,7 @@ class EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '暂无统计数据', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -285,7 +285,7 @@ class EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( '开始使用后,这里将展示你的数据', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], @@ -324,7 +324,7 @@ class ErrorState extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '数据加载失败', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -334,7 +334,7 @@ class ErrorState extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: AppSpacing.xl), child: Text( error, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, maxLines: 3, overflow: TextOverflow.ellipsis, @@ -360,7 +360,7 @@ class ErrorState extends StatelessWidget { const SizedBox(width: 6), Text( '重新加载', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), diff --git a/lib/features/weather/presentation/weather_page.dart b/lib/features/weather/presentation/weather_page.dart index 03399f3e..2740c22f 100644 --- a/lib/features/weather/presentation/weather_page.dart +++ b/lib/features/weather/presentation/weather_page.dart @@ -61,7 +61,7 @@ class _WeatherPageState extends ConsumerState { leading: const AdaptiveBackButton(), middle: Text( '🌤️ 情景诗词', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), backgroundColor: ext.bgPrimary.withValues(alpha: 0.85), border: null, @@ -111,9 +111,9 @@ class _WeatherPageState extends ConsumerState { .animate() .scale(duration: 400.ms, begin: const Offset(0.5, 0.5)), const SizedBox(height: AppSpacing.md), - Text('加载失败', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text('加载失败', style: AppTypography.headline.copyWith(color: ext.textPrimary)), const SizedBox(height: AppSpacing.sm), - Text(error, style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center), + Text(error, style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center), const SizedBox(height: AppSpacing.lg), CupertinoButton.filled( onPressed: () => ref.read(weatherProvider.notifier).refresh(), @@ -164,7 +164,7 @@ class _WeatherPageState extends ConsumerState { const SizedBox(width: 6), Text( '正在更新...', - style: AppTypography.of(context).caption1.copyWith(color: ext.accent), + style: AppTypography.caption1.copyWith(color: ext.accent), ), ], ), @@ -256,7 +256,7 @@ class _WeatherPageState extends ConsumerState { child: Center( child: Text( msg.content, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ), ).animate().fadeIn(duration: 300.ms, delay: delay); @@ -299,7 +299,7 @@ class _WeatherPageState extends ConsumerState { Text(weather.icon, style: const TextStyle(fontSize: 36)), Text( '${weather.temp}°', - style: AppTypography.of(context).display.copyWith( + style: AppTypography.display.copyWith( fontWeight: FontWeight.w300, color: ext.textPrimary, ), @@ -307,9 +307,9 @@ class _WeatherPageState extends ConsumerState { ], ), const SizedBox(height: AppSpacing.sm), - Text(weather.city, style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text(weather.city, style: AppTypography.headline.copyWith(color: ext.textPrimary)), const SizedBox(height: AppSpacing.xs), - Text(weather.weather, style: AppTypography.of(context).subhead.copyWith(color: ext.textSecondary)), + Text(weather.weather, style: AppTypography.subhead.copyWith(color: ext.textSecondary)), const SizedBox(height: AppSpacing.md), Row( children: [ @@ -338,9 +338,9 @@ class _WeatherPageState extends ConsumerState { children: [ Text(emoji, style: const TextStyle(fontSize: 16)), const SizedBox(height: 2), - Text(label, style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), + Text(label, style: AppTypography.caption2.copyWith(color: ext.textHint)), const SizedBox(height: 2), - Text(value, style: AppTypography.of(context).caption1.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text(value, style: AppTypography.caption1.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), ], ), ); @@ -370,7 +370,7 @@ class _WeatherPageState extends ConsumerState { ), child: Text( text, - style: AppTypography.of(context).caption1.copyWith(color: ext.accent, fontWeight: FontWeight.w500), + style: AppTypography.caption1.copyWith(color: ext.accent, fontWeight: FontWeight.w500), ), ), ); @@ -406,7 +406,7 @@ class _WeatherPageState extends ConsumerState { const SizedBox(width: 6), Text( '${mood.label}天 · 诗词推荐', - style: AppTypography.of(context).footnote.copyWith(color: ext.accent, fontWeight: FontWeight.w500), + style: AppTypography.footnote.copyWith(color: ext.accent, fontWeight: FontWeight.w500), ), ], ), @@ -435,14 +435,14 @@ class _WeatherPageState extends ConsumerState { children: [ Text( msg.content.cleanHtml, - style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary, height: 1.8), + style: AppTypography.headline.copyWith(color: ext.textPrimary, height: 1.8), textAlign: TextAlign.center, ), if (msg.poetryAuthor != null && msg.poetryAuthor!.isNotEmpty) ...[ const SizedBox(height: 10), Text( '—— ${msg.poetryAuthor}', - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), ], @@ -450,7 +450,7 @@ class _WeatherPageState extends ConsumerState { const SizedBox(height: 4), Text( '《${msg.poetryTitle}》', - style: AppTypography.of(context).footnote.copyWith(color: ext.textSecondary), + style: AppTypography.footnote.copyWith(color: ext.textSecondary), textAlign: TextAlign.center, ), ], @@ -485,7 +485,7 @@ class _WeatherPageState extends ConsumerState { children: [ Text(emoji, style: const TextStyle(fontSize: 14)), const SizedBox(width: 4), - Text(label, style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary)), + Text(label, style: AppTypography.caption1.copyWith(color: ext.textSecondary)), ], ), ), @@ -519,7 +519,7 @@ class _WeatherPageState extends ConsumerState { const SizedBox(width: 6), Text( '${mood?.label ?? ''}天诗词', - style: AppTypography.of(context).body.copyWith( + style: AppTypography.body.copyWith( fontWeight: FontWeight.w600, color: ext.textPrimary, ), @@ -541,7 +541,7 @@ class _WeatherPageState extends ConsumerState { children: [ Text( (poem['content'] as String? ?? '').cleanHtml, - style: AppTypography.of(context).callout.copyWith(color: ext.textPrimary, height: 1.6), + style: AppTypography.callout.copyWith(color: ext.textPrimary, height: 1.6), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -551,13 +551,13 @@ class _WeatherPageState extends ConsumerState { if ((poem['author'] as String?)?.isNotEmpty ?? false) Text( poem['author'] as String, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), if ((poem['title'] as String?)?.isNotEmpty ?? false) ...[ const SizedBox(width: AppSpacing.sm), Text( '《${poem['title']}》', - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), ), ], const Spacer(), @@ -569,7 +569,7 @@ class _WeatherPageState extends ConsumerState { ), child: Text( poem['keyword'] as String? ?? '', - style: AppTypography.of(context).caption2.copyWith(color: ext.accent), + style: AppTypography.caption2.copyWith(color: ext.accent), ), ), ], @@ -638,8 +638,8 @@ class _WeatherPageState extends ConsumerState { children: [ Text(item.emoji, style: const TextStyle(fontSize: 18)), const SizedBox(height: 2), - Text(item.label, style: AppTypography.of(context).caption2.copyWith(color: ext.textHint)), - Text(item.value, style: AppTypography.of(context).caption1.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), + Text(item.label, style: AppTypography.caption2.copyWith(color: ext.textHint)), + Text(item.value, style: AppTypography.caption1.copyWith(color: ext.textPrimary, fontWeight: FontWeight.w500)), ], ), ); @@ -666,7 +666,7 @@ class _WeatherPageState extends ConsumerState { ), child: Text( msg.content, - style: AppTypography.of(context).body.copyWith(color: ext.textOnAccent), + style: AppTypography.body.copyWith(color: ext.textOnAccent), ), ), ), @@ -724,8 +724,8 @@ class _WeatherPageState extends ConsumerState { child: CupertinoTextField( controller: _inputController, placeholder: '说点什么...', - placeholderStyle: AppTypography.of(context).body.copyWith(color: ext.textHint), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + placeholderStyle: AppTypography.body.copyWith(color: ext.textHint), + style: AppTypography.body.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md, vertical: 10), decoration: BoxDecoration( color: ext.bgSecondary, @@ -786,9 +786,9 @@ class _WeatherPageState extends ConsumerState { children: [ Icon(CupertinoIcons.calendar, size: 16, color: ext.accent), const SizedBox(width: 6), - Text('情景日历', style: AppTypography.of(context).headline.copyWith(color: ext.textPrimary)), + Text('情景日历', style: AppTypography.headline.copyWith(color: ext.textPrimary)), const Spacer(), - Text('${historyDays.length}天记录', style: AppTypography.of(context).caption1.copyWith(color: ext.textHint)), + Text('${historyDays.length}天记录', style: AppTypography.caption1.copyWith(color: ext.textHint)), ], ), ), @@ -800,9 +800,9 @@ class _WeatherPageState extends ConsumerState { children: [ Icon(CupertinoIcons.calendar_badge_plus, size: 40, color: ext.textHint), const SizedBox(height: 8), - Text('暂无历史记录', style: AppTypography.of(context).subhead.copyWith(color: ext.textHint)), + Text('暂无历史记录', style: AppTypography.subhead.copyWith(color: ext.textHint)), const SizedBox(height: 4), - Text('查看情景后会自动保存', style: AppTypography.of(context).caption1.copyWith(color: ext.textHint)), + Text('查看情景后会自动保存', style: AppTypography.caption1.copyWith(color: ext.textHint)), ], ), ) @@ -837,7 +837,7 @@ class _WeatherPageState extends ConsumerState { Text(moodEmoji, style: const TextStyle(fontSize: 16)), Text( day.date.split('-').last, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w700, ), @@ -852,7 +852,7 @@ class _WeatherPageState extends ConsumerState { children: [ Text( day.weather.weather, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -860,7 +860,7 @@ class _WeatherPageState extends ConsumerState { const SizedBox(height: 2), Text( '${day.weather.city} ${day.weather.temp}° ${day.weather.humidity}', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/features/weather/presentation/weather_settings_page.dart b/lib/features/weather/presentation/weather_settings_page.dart index 35b7d802..95b2284c 100644 --- a/lib/features/weather/presentation/weather_settings_page.dart +++ b/lib/features/weather/presentation/weather_settings_page.dart @@ -84,7 +84,7 @@ class _WeatherSettingsPageState extends ConsumerState { const SizedBox(width: 6), Text( '天气诗词设置', - style: AppTypography.of(context).title3.copyWith(color: ext.textPrimary), + style: AppTypography.title3.copyWith(color: ext.textPrimary), ), ], ), @@ -139,14 +139,14 @@ class _WeatherSettingsPageState extends ConsumerState { children: [ Text( '天气诗词', - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), Text( '根据天气智能推荐诗词', - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), @@ -332,14 +332,14 @@ class _WeatherSettingsPageState extends ConsumerState { children: [ Text( '📍 城市设置', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( '留空则自动定位当前城市', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.textHint, ), ), @@ -352,10 +352,10 @@ class _WeatherSettingsPageState extends ConsumerState { CupertinoTextField( controller: _cityController, placeholder: '输入城市名称', - placeholderStyle: AppTypography.of(context).subhead.copyWith( + placeholderStyle: AppTypography.subhead.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), padding: const EdgeInsets.symmetric( horizontal: AppSpacing.md, vertical: AppSpacing.sm, @@ -404,14 +404,14 @@ class _WeatherSettingsPageState extends ConsumerState { children: [ Text( '$emoji $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), ), Text( subtitle, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -463,7 +463,7 @@ class _WeatherSettingsPageState extends ConsumerState { Expanded( child: Text( '🕐 $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -480,7 +480,7 @@ class _WeatherSettingsPageState extends ConsumerState { ), child: Text( time, - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -524,7 +524,7 @@ class _WeatherSettingsPageState extends ConsumerState { children: [ Text( '$emoji $title', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w500, ), @@ -543,7 +543,7 @@ class _WeatherSettingsPageState extends ConsumerState { ), child: Text( opt, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: selectedKey == opt ? ext.textOnAccent : ext.textSecondary, @@ -599,7 +599,7 @@ class _WeatherSettingsPageState extends ConsumerState { padding: EdgeInsets.zero, child: Text( '取消', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textHint, ), ), @@ -607,7 +607,7 @@ class _WeatherSettingsPageState extends ConsumerState { ), Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -616,7 +616,7 @@ class _WeatherSettingsPageState extends ConsumerState { padding: EdgeInsets.zero, child: Text( '确定', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), diff --git a/lib/features/widget/presentation/widget_management_page.dart b/lib/features/widget/presentation/widget_management_page.dart index cd961c95..4414923d 100644 --- a/lib/features/widget/presentation/widget_management_page.dart +++ b/lib/features/widget/presentation/widget_management_page.dart @@ -87,7 +87,7 @@ class _WidgetManagementPageState extends ConsumerState { const SizedBox(width: AppSpacing.sm), Text( '桌面小部件', - style: AppTypography.of(context).title1.copyWith( + style: AppTypography.title1.copyWith( color: ext.textPrimary, ), ), @@ -123,7 +123,7 @@ class _WidgetManagementPageState extends ConsumerState { const SizedBox(width: 6), Text( _priorityLabel(entry.key), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, ), ), @@ -161,7 +161,7 @@ class _WidgetManagementPageState extends ConsumerState { padding: const EdgeInsets.all(AppSpacing.md), child: Text( '错误: ${widgetState.error}', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: CupertinoColors.systemRed, ), ), @@ -301,7 +301,7 @@ class _WidgetManagementPageState extends ConsumerState { children: [ Text( guideReason, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -310,7 +310,7 @@ class _WidgetManagementPageState extends ConsumerState { padding: const EdgeInsets.only(bottom: AppSpacing.xs), child: Text( s, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, ), ), @@ -367,7 +367,7 @@ class _ThemeToggle extends StatelessWidget { const SizedBox(width: 4), Text( '同步主题', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -420,7 +420,7 @@ class _PlatformCompatibilityCard extends StatelessWidget { const SizedBox(width: AppSpacing.sm), Text( '平台兼容说明', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -466,7 +466,7 @@ class _PlatformCompatibilityCard extends StatelessWidget { Expanded( child: Text( '点击「同步主题」可将当前深色/浅色模式推送到所有已安装小部件', - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -505,14 +505,14 @@ class _PlatformRow extends StatelessWidget { children: [ TextSpan( text: '$name ', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), ), TextSpan( text: desc, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -568,7 +568,7 @@ class _WidgetCard extends StatelessWidget { children: [ Text( type.title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -580,7 +580,7 @@ class _WidgetCard extends StatelessWidget { const SizedBox(height: 2), Text( type.subtitle, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ), @@ -600,7 +600,7 @@ class _WidgetCard extends StatelessWidget { ), child: Text( '已安装', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemGreen, fontWeight: FontWeight.w600, ), @@ -620,7 +620,7 @@ class _WidgetCard extends StatelessWidget { ? const CupertinoActivityIndicator(radius: 8) : Text( '添加', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -670,7 +670,7 @@ class _PriorityBadge extends StatelessWidget { ), child: Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: color, fontWeight: FontWeight.w700, fontSize: 9, @@ -716,7 +716,7 @@ class _Badge extends StatelessWidget { ), child: Text( supported ? label : '$label✗', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: supported ? CupertinoColors.systemGreen : CupertinoColors.systemGrey, @@ -742,7 +742,7 @@ class _DeepLinkBadge extends StatelessWidget { const SizedBox(width: 2), Text( route, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontSize: 9, ), @@ -840,7 +840,7 @@ class _WidgetDataPreviewState extends ConsumerState<_WidgetDataPreview> { const SizedBox(width: 4), Text( '数据预览', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -859,7 +859,7 @@ class _WidgetDataPreviewState extends ConsumerState<_WidgetDataPreview> { const SizedBox(width: 2), Text( '刷新', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -885,7 +885,7 @@ class _WidgetDataPreviewState extends ConsumerState<_WidgetDataPreview> { ), child: Text( _getPreviewText(), - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textPrimary, ), maxLines: 2, diff --git a/lib/shared/widgets/animation/animated_widgets.dart b/lib/shared/widgets/animation/animated_widgets.dart index 209c1398..73b79974 100644 --- a/lib/shared/widgets/animation/animated_widgets.dart +++ b/lib/shared/widgets/animation/animated_widgets.dart @@ -38,7 +38,7 @@ class AnimatedCounter extends StatelessWidget { builder: (context, animatedValue, child) { return Text( '$prefix$animatedValue$suffix', - style: style ?? AppTypography.of(context).title2, + style: style ?? AppTypography.title2, ); }, ); @@ -74,7 +74,7 @@ class AnimatedDoubleCounter extends StatelessWidget { builder: (context, animatedValue, child) { return Text( '$prefix${animatedValue.toStringAsFixed(fractionDigits)}$suffix', - style: style ?? AppTypography.of(context).title2, + style: style ?? AppTypography.title2, ); }, ); diff --git a/lib/shared/widgets/animation/character_tip_bubble.dart b/lib/shared/widgets/animation/character_tip_bubble.dart index ca61dcad..1fd7637d 100644 --- a/lib/shared/widgets/animation/character_tip_bubble.dart +++ b/lib/shared/widgets/animation/character_tip_bubble.dart @@ -75,7 +75,7 @@ class CharacterTipBubble extends ConsumerWidget { const SizedBox(width: 4), Text( state.currentTip!.category.label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -85,7 +85,7 @@ class CharacterTipBubble extends ConsumerWidget { const SizedBox(height: 4), Text( state.currentTip!.content, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textPrimary, height: 1.3, ), diff --git a/lib/shared/widgets/animation/sprite_dialog_bubble.dart b/lib/shared/widgets/animation/sprite_dialog_bubble.dart index b724c891..6f15ed46 100644 --- a/lib/shared/widgets/animation/sprite_dialog_bubble.dart +++ b/lib/shared/widgets/animation/sprite_dialog_bubble.dart @@ -77,7 +77,7 @@ class SpriteDialogBubble extends StatelessWidget { ), child: Text( _dialogText, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, height: 1.3, diff --git a/lib/shared/widgets/animation/sprite_loading_indicator.dart b/lib/shared/widgets/animation/sprite_loading_indicator.dart index 47dc8126..71265c18 100644 --- a/lib/shared/widgets/animation/sprite_loading_indicator.dart +++ b/lib/shared/widgets/animation/sprite_loading_indicator.dart @@ -103,7 +103,7 @@ class _SpriteLoadingIndicatorState extends State { child: Text( displayLabel, key: ValueKey('${displayLabel}_$isStage2'), - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: isStage2 ? ext.accent : ext.textSecondary, fontWeight: FontWeight.w700, ), @@ -115,7 +115,7 @@ class _SpriteLoadingIndicatorState extends State { child: Text( displaySublabel, key: ValueKey(displaySublabel), - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: isStage2 ? ext.accent : ext.textHint, ), ), diff --git a/lib/shared/widgets/animation/tab_icon_sprite.dart b/lib/shared/widgets/animation/tab_icon_sprite.dart index 619441be..5f77f5e8 100644 --- a/lib/shared/widgets/animation/tab_icon_sprite.dart +++ b/lib/shared/widgets/animation/tab_icon_sprite.dart @@ -334,7 +334,7 @@ class _TabIconSpriteState extends State opacity: labelAlpha.clamp(0.0, 1.0), child: Text( widget.label, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: widget.isSelected ? (ext.isDark ? Colors.white : ext.accent) : (ext.isDark diff --git a/lib/shared/widgets/cards/level_card.dart b/lib/shared/widgets/cards/level_card.dart index 685dfc48..38ec33eb 100644 --- a/lib/shared/widgets/cards/level_card.dart +++ b/lib/shared/widgets/cards/level_card.dart @@ -130,7 +130,7 @@ class LevelCard extends StatelessWidget { alignment: Alignment.center, child: Text( 'Lv.$level', - style: AppTypography.of(context).callout.copyWith( + style: AppTypography.callout.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.bold, fontSize: 13, @@ -160,7 +160,7 @@ class LevelCard extends StatelessWidget { children: [ Text( levelTitle, - style: AppTypography.of(context).headline.copyWith( + style: AppTypography.headline.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, fontSize: 16, @@ -179,7 +179,7 @@ class LevelCard extends StatelessWidget { ), child: Text( 'MAX', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: _levelColor(level), fontWeight: FontWeight.bold, ), @@ -235,7 +235,7 @@ class LevelCard extends StatelessWidget { return Text( displayText, - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: _isMaxLevel ? color : ext.textHint, fontWeight: _isMaxLevel ? FontWeight.w600 : FontWeight.normal, ), diff --git a/lib/shared/widgets/cards/rank_item_card.dart b/lib/shared/widgets/cards/rank_item_card.dart index a6b44213..0c4d7de4 100644 --- a/lib/shared/widgets/cards/rank_item_card.dart +++ b/lib/shared/widgets/cards/rank_item_card.dart @@ -6,7 +6,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_animate/flutter_animate.dart'; import '../../../features/rank/models/rank_models.dart'; -import '../../../features/rank/providers/rank_provider.dart'; import '../../../core/utils/data/level_utils.dart'; import '../media/safe_cached_image.dart'; diff --git a/lib/shared/widgets/containers/app_sticky_header.dart b/lib/shared/widgets/containers/app_sticky_header.dart index dd6acbc2..5f6ba4b4 100644 --- a/lib/shared/widgets/containers/app_sticky_header.dart +++ b/lib/shared/widgets/containers/app_sticky_header.dart @@ -104,7 +104,7 @@ class _StickyHeaderContent extends StatelessWidget { ], Text( title, - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), @@ -113,7 +113,7 @@ class _StickyHeaderContent extends StatelessWidget { if (trailing != null) Text( trailing!, - style: AppTypography.of(context).caption1.copyWith(color: ext.textHint), + style: AppTypography.caption1.copyWith(color: ext.textHint), ), ], ), diff --git a/lib/shared/widgets/display/appbar_date_display.dart b/lib/shared/widgets/display/appbar_date_display.dart index 3ee5fa3b..747b22b4 100644 --- a/lib/shared/widgets/display/appbar_date_display.dart +++ b/lib/shared/widgets/display/appbar_date_display.dart @@ -93,13 +93,13 @@ class AppBarDateDisplay extends ConsumerWidget { child: displayText.length > 10 && config.marqueeEnabled ? _MarqueeText( text: displayText, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), ) : Text( displayText, - style: AppTypography.of(context).footnote.copyWith( + style: AppTypography.footnote.copyWith( color: ext.textSecondary, ), maxLines: 1, diff --git a/lib/shared/widgets/feedback/app_toast.dart b/lib/shared/widgets/feedback/app_toast.dart index de70ddab..443534e9 100644 --- a/lib/shared/widgets/feedback/app_toast.dart +++ b/lib/shared/widgets/feedback/app_toast.dart @@ -97,7 +97,7 @@ class _ToastWidget extends StatelessWidget { Flexible( child: Text( message, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), textAlign: TextAlign.center, ), ), @@ -145,7 +145,7 @@ class _LoadingWidget extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( message!, - style: AppTypography.of(context).subhead.copyWith(color: ext.textPrimary), + style: AppTypography.subhead.copyWith(color: ext.textPrimary), ), ], ], diff --git a/lib/shared/widgets/feedback/empty_state.dart b/lib/shared/widgets/feedback/empty_state.dart index 0fc668c3..7f5d0666 100644 --- a/lib/shared/widgets/feedback/empty_state.dart +++ b/lib/shared/widgets/feedback/empty_state.dart @@ -155,7 +155,7 @@ class EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.md), Text( type.title, - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -163,7 +163,7 @@ class EmptyState extends StatelessWidget { const SizedBox(height: AppSpacing.xs), Text( type.subtitle, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), if (onRetry != null || onAction != null) ...[ @@ -178,7 +178,7 @@ class EmptyState extends StatelessWidget { onPressed: onAction ?? onRetry, child: Text( actionLabel ?? '重试', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), @@ -237,7 +237,7 @@ class ErrorState extends StatelessWidget { const SizedBox(height: AppSpacing.lg), Text( '加载失败', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w600, ), @@ -245,7 +245,7 @@ class ErrorState extends StatelessWidget { const SizedBox(height: AppSpacing.sm), Text( message, - style: AppTypography.of(context).subhead.copyWith(color: ext.textHint), + style: AppTypography.subhead.copyWith(color: ext.textHint), textAlign: TextAlign.center, ), if (onRetry != null) ...[ @@ -269,7 +269,7 @@ class ErrorState extends StatelessWidget { const SizedBox(width: 6), Text( '重新加载', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.white, fontWeight: FontWeight.w600, ), diff --git a/lib/shared/widgets/feedback/offline_banner.dart b/lib/shared/widgets/feedback/offline_banner.dart index 8c5fe275..073dcc80 100644 --- a/lib/shared/widgets/feedback/offline_banner.dart +++ b/lib/shared/widgets/feedback/offline_banner.dart @@ -48,7 +48,7 @@ class OfflineBanner extends ConsumerWidget { const SizedBox(width: AppSpacing.sm), Text( '离线模式 · 使用缓存数据', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: CupertinoColors.systemOrange.darkColor, fontWeight: FontWeight.w600, ), @@ -84,7 +84,7 @@ class OfflineIndicator extends ConsumerWidget { const SizedBox(width: 4), Text( '离线', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: CupertinoColors.systemOrange, fontWeight: FontWeight.w600, ), diff --git a/lib/shared/widgets/feedback/share_sheet.dart b/lib/shared/widgets/feedback/share_sheet.dart index dd13bae7..c36c79a5 100644 --- a/lib/shared/widgets/feedback/share_sheet.dart +++ b/lib/shared/widgets/feedback/share_sheet.dart @@ -322,7 +322,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { Expanded( child: Text( data.title ?? '分享${data.scene.label}', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -337,7 +337,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { ), child: Text( data.shareSource!, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -448,7 +448,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { const SizedBox(height: AppSpacing.sm), Text( '扫描二维码查看', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.isDark ? const Color(0xFF8E8E93) : const Color(0xFF636366), @@ -633,7 +633,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { ), child: Text( '#$tag', - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.accent, fontWeight: FontWeight.w500, ), @@ -658,7 +658,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { Expanded( child: Text( data.shareUrl, - style: AppTypography.of(context).caption1.copyWith(color: ext.textSecondary), + style: AppTypography.caption1.copyWith(color: ext.textSecondary), maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -669,7 +669,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { onPressed: _copyUrl, child: Text( '复制', - style: AppTypography.of(context).caption1.copyWith( + style: AppTypography.caption1.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -700,7 +700,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { Expanded( child: Text( hasNote ? _currentNote! : '添加笔记...', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: hasNote ? ext.textPrimary : ext.textHint, ), maxLines: 2, @@ -749,7 +749,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { children: [ Text( '🗒️ 添加笔记', - style: AppTypography.of(context).title3.copyWith( + style: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w700, ), @@ -767,7 +767,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { }, child: Text( '完成', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -779,10 +779,10 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { CupertinoTextField( controller: controller, placeholder: '写下你的感想...', - placeholderStyle: AppTypography.of(context).body.copyWith( + placeholderStyle: AppTypography.body.copyWith( color: ext.textHint, ), - style: AppTypography.of(context).body.copyWith(color: ext.textPrimary), + style: AppTypography.body.copyWith(color: ext.textPrimary), maxLines: 5, minLines: 3, padding: const EdgeInsets.all(AppSpacing.md), @@ -804,7 +804,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { }, child: Text( '清除', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: CupertinoColors.systemRed, ), ), @@ -816,7 +816,7 @@ class _ShareSheetContentState extends State<_ShareSheetContent> { onPressed: () => _saveNoteToApp(controller.text.trim()), child: Text( '📝 保存到笔记', - style: AppTypography.of(context).subhead.copyWith( + style: AppTypography.subhead.copyWith( color: ext.accent, fontWeight: FontWeight.w600, ), @@ -1000,7 +1000,7 @@ class _ShareActionBtn extends StatelessWidget { const SizedBox(height: 6), Text( label, - style: AppTypography.of(context).caption2.copyWith( + style: AppTypography.caption2.copyWith( color: ext.textSecondary, fontWeight: FontWeight.w500, ), diff --git a/lib/shared/widgets/input/app_markdown.dart b/lib/shared/widgets/input/app_markdown.dart index f903db05..98bd7f27 100644 --- a/lib/shared/widgets/input/app_markdown.dart +++ b/lib/shared/widgets/input/app_markdown.dart @@ -38,41 +38,41 @@ class AppMarkdownBody extends StatelessWidget { shrinkWrap: shrinkWrap, onTapLink: onTapLink, styleSheet: MarkdownStyleSheet.fromTheme(theme).copyWith( - p: AppTypography.of(context).body.copyWith(color: ext.textPrimary, height: 1.7), - h1: AppTypography.of(context).display.copyWith( + p: AppTypography.body.copyWith(color: ext.textPrimary, height: 1.7), + h1: AppTypography.display.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), - h2: AppTypography.of(context).title1.copyWith( + h2: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), - h3: AppTypography.of(context).title2.copyWith( + h3: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), - h4: AppTypography.of(context).title3.copyWith( + h4: AppTypography.title3.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), - code: AppTypography.of(context).footnote.copyWith( + code: AppTypography.footnote.copyWith( color: ext.textPrimary, backgroundColor: ext.bgSecondary, ), - blockquote: AppTypography.of(context).body.copyWith( + blockquote: AppTypography.body.copyWith( color: ext.textSecondary, fontStyle: FontStyle.italic, ), - listBullet: AppTypography.of(context).body.copyWith(color: ext.textSecondary), - a: AppTypography.of(context).body.copyWith( + listBullet: AppTypography.body.copyWith(color: ext.textSecondary), + a: AppTypography.body.copyWith( color: CupertinoColors.activeBlue, decoration: TextDecoration.underline, ), - em: AppTypography.of(context).body.copyWith( + em: AppTypography.body.copyWith( color: ext.textSecondary, fontStyle: FontStyle.italic, ), - strong: AppTypography.of(context).body.copyWith( + strong: AppTypography.body.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), @@ -96,24 +96,24 @@ class AppMarkdown extends StatelessWidget { data: data, onTapLink: onTapLink, styleSheet: MarkdownStyleSheet.fromTheme(theme).copyWith( - p: AppTypography.of(context).body.copyWith(color: ext.textPrimary, height: 1.7), - h1: AppTypography.of(context).display.copyWith( + p: AppTypography.body.copyWith(color: ext.textPrimary, height: 1.7), + h1: AppTypography.display.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), - h2: AppTypography.of(context).title1.copyWith( + h2: AppTypography.title1.copyWith( color: ext.textPrimary, fontWeight: FontWeight.bold, ), - h3: AppTypography.of(context).title2.copyWith( + h3: AppTypography.title2.copyWith( color: ext.textPrimary, fontWeight: FontWeight.w600, ), - code: AppTypography.of(context).footnote.copyWith( + code: AppTypography.footnote.copyWith( color: ext.textPrimary, backgroundColor: ext.bgSecondary, ), - a: AppTypography.of(context).body.copyWith( + a: AppTypography.body.copyWith( color: CupertinoColors.activeBlue, decoration: TextDecoration.underline, ), diff --git a/lib/shared/widgets/media/safe_cached_image.dart b/lib/shared/widgets/media/safe_cached_image.dart index ef6d18d5..51e03020 100644 --- a/lib/shared/widgets/media/safe_cached_image.dart +++ b/lib/shared/widgets/media/safe_cached_image.dart @@ -1,4 +1,4 @@ -/// ============================================================ +/// ============================================================ /// 闲言APP — 安全缓存图片组件 + 容错缓存管理器 /// 创建时间: 2026-05-23 /// 更新时间: 2026-05-23 @@ -103,7 +103,7 @@ class _SafeCachedImageState extends State { progressIndicatorBuilder: (context, url, progress) { final downloaded = progress.downloaded; final totalSize = progress.totalSize; - if (downloaded != null && totalSize != null && totalSize > 0) { + if (totalSize != null && totalSize > 0) { final percent = (downloaded / totalSize * 100).toInt(); return CupertinoActivityIndicator.partiallyRevealed( progress: percent / 100, @@ -180,13 +180,6 @@ class _SafeCachedImageState extends State { } } - static Future preload(String url) async { - if (!_isUrlValid(url)) return; - try { - await CachedNetworkImage.evictFromCache(url); - } catch (_) {} - } - static bool _isUrlValid(String url) { if (url.isEmpty) return false; if (url.startsWith('data:')) return true; diff --git a/lib/shared/widgets/media/tts_player_bar.dart b/lib/shared/widgets/media/tts_player_bar.dart index a24f991a..277d1976 100644 --- a/lib/shared/widgets/media/tts_player_bar.dart +++ b/lib/shared/widgets/media/tts_player_bar.dart @@ -130,7 +130,7 @@ class _TtsPlayerBarState extends State { const SizedBox(height: 4), Text( _isPlaying ? '正在朗读...' : (_progress > 0 ? '已暂停' : '点击播放'), - style: AppTypography.of(context).caption2.copyWith(color: ext.textHint), + style: AppTypography.caption2.copyWith(color: ext.textHint), ), ], ),