feat(ui): 增加视觉 token 与统一导航

This commit is contained in:
Zhou Weidong committed 2026-10-19 10:16:12 +08:00
1 parent 42ce1d1d84
commit df5fbe5b08
7 files changed
+260 -1

No files matched your search

+3
View File
@@ -20,6 +20,9 @@ abstract final class AppColors {
/// Coins, rewards, and the playback progress line.
static const gold = Color(0xFFF6C453);
/// Favorite/like heart without competing with the chili primary action.
static const favorite = Color(0xFFD74A7D);
/// Text placed on [gold].
static const onGold = Color(0xFF2A1810);
+40
View File
@@ -0,0 +1,40 @@
// Author: fruit.com.cn
/// K20 cross-page spacing, type, radius, and control sizes.
abstract final class AppDimens {
static const double spaceXs = 4;
static const double spaceSm = 8;
static const double spaceMd = 12;
static const double spaceLg = 16;
static const double spaceXl = 24;
static const double pageHorizontal = 16;
static const double cardRadius = 16;
static const double cardPadding = 16;
static const double innerRadius = 12;
static const double innerPadding = 12;
static const double pillRadius = 20;
static const double caption = 12;
static const double body = 14;
static const double listTitle = 15;
static const double sectionTitle = 16;
static const double pageTitle = 20;
static const double detailHeadline = 24;
static const double navLabel = 11;
static const double buttonHeight = 48;
static const double primaryButtonHeight = 52;
static const double tapTarget = 44;
static const double navHeight = 64;
static const double navIcon = 22;
static const double progressHeight = 4;
static const double progressRadius = 4;
static const double accountCardHeight = 64;
static const double accountIcon = 18;
static const double accountLabel = 11;
static const double watchPlaceholderHeight = 114;
}
+28
View File
@@ -1,8 +1,10 @@
// Author: fruit.com.cn
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'app_colors.dart';
import 'app_dimens.dart';
/// Light paper and warm-cocoa themes for the Indonesia evening palette.
abstract final class AppTheme {
@@ -80,6 +82,32 @@ abstract final class AppTheme {
style: ButtonStyle(
backgroundColor: WidgetStateProperty.resolveWith(_buttonColor),
foregroundColor: const WidgetStatePropertyAll(AppColors.onPrimary),
minimumSize: const WidgetStatePropertyAll(
Size(0, AppDimens.buttonHeight),
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: ButtonStyle(
foregroundColor: WidgetStatePropertyAll(
dark ? AppColors.blueSoft : AppColors.bluePressed,
),
minimumSize: const WidgetStatePropertyAll(
Size(0, AppDimens.buttonHeight),
),
side: WidgetStatePropertyAll(
BorderSide(
color: dark ? AppColors.outlineDark : AppColors.outlineLight,
),
),
),
),
appBarTheme: const AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.light,
titleTextStyle: TextStyle(
color: AppColors.cream,
fontSize: AppDimens.pageTitle,
fontWeight: FontWeight.w800,
),
),
switchTheme: SwitchThemeData(