refactor: 完成AppTypography Token化重构,统一UI样式调用
1. 将AppTypography从静态常量类重构为ThemeExtension+静态实例模式,支持全局响应式字体调整 2. 批量替换全量代码中的AppTypography.of(context)调用为静态直接调用 3. 移除多余的rank_provider、canvas_style_middleware导入和preload静态方法 4. 修复多处UI文本样式不一致的问题,统一字体样式调用逻辑
This commit is contained in:
@@ -76,7 +76,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
children: [
|
||||
Text(
|
||||
'纠错类型',
|
||||
style: AppTypography.of(context).headline.copyWith(
|
||||
style: AppTypography.headline.copyWith(
|
||||
color: ext.textPrimary,
|
||||
),
|
||||
),
|
||||
@@ -104,7 +104,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
),
|
||||
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<CorrectionPage> {
|
||||
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<CorrectionPage> {
|
||||
),
|
||||
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<CorrectionPage> {
|
||||
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<CorrectionPage> {
|
||||
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<CorrectionPage> {
|
||||
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<CorrectionPage> {
|
||||
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<CorrectionPage> {
|
||||
)
|
||||
: 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<CorrectionPage> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
'提交成功!感谢您的反馈,管理员会及时处理。',
|
||||
style: AppTypography.of(context).subhead.copyWith(
|
||||
style: AppTypography.subhead.copyWith(
|
||||
color: ext.accent,
|
||||
),
|
||||
),
|
||||
@@ -268,7 +268,7 @@ class _CorrectionPageState extends ConsumerState<CorrectionPage> {
|
||||
padding: const EdgeInsets.only(top: AppSpacing.md),
|
||||
child: Text(
|
||||
state.error!,
|
||||
style: AppTypography.of(context).body.copyWith(
|
||||
style: AppTypography.body.copyWith(
|
||||
color: CupertinoColors.systemRed,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user