chore: 更新国际化翻译及 UI 组件优化

This commit is contained in:
zl-q
2026-03-30 09:07:30 +08:00
parent 0f3175e303
commit 60318b7aaa
28 changed files with 1360 additions and 66 deletions
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../../../core/l10n/l10n.dart';
import '../../../core/theme/design_tokens.dart';
import 'toast_type.dart';
class ToastTypeConfig {
@@ -25,18 +26,22 @@ class ToastTypeConfig {
return switch (type) {
ToastType.success => ToastTypeConfig(
surfaceColor: colorScheme.tertiaryContainer,
borderColor: colorScheme.tertiary,
iconColor: colorScheme.tertiary,
textColor: colorScheme.onTertiaryContainer,
surfaceColor: colorScheme.primaryContainer,
borderColor: colorScheme.primary,
iconColor: colorScheme.primary,
textColor: colorScheme.onPrimaryContainer,
label: l10n.toastLabelSuccess,
icon: Icons.check_circle_outline,
),
ToastType.warning => ToastTypeConfig(
surfaceColor: colorScheme.secondaryContainer,
borderColor: colorScheme.secondary,
iconColor: colorScheme.secondary,
textColor: colorScheme.onSecondaryContainer,
surfaceColor: Theme.of(
context,
).extension<AppColorPalette>()!.warningContainer,
borderColor: Theme.of(context).extension<AppColorPalette>()!.warning,
iconColor: Theme.of(context).extension<AppColorPalette>()!.warning,
textColor: Theme.of(
context,
).extension<AppColorPalette>()!.onWarningContainer,
label: l10n.toastLabelWarning,
icon: Icons.warning_amber_rounded,
),