style: 淡薰紫 Lavender Breeze + UI修复
- 主色改淡薰紫 #8B9CF7 + 白底 清新风格 - 每个智能体卡不同淡色调 - 删除欢迎卡底部"或直接对我说" - 运动创建/打卡接入 API - 全项目薄荷绿→淡紫替换
This commit is contained in:
@@ -1,57 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 健康管家 — Fresh Air 清新风
|
||||
/// 薄荷绿主调 · 轻透白底 · 珊瑚点缀
|
||||
/// 健康管家 — Lavender Breeze 淡紫清风
|
||||
class AppTheme {
|
||||
AppTheme._();
|
||||
|
||||
static const Color primary = Color(0xFF14B8A6); // 薄荷绿
|
||||
static const Color primaryLight = Color(0xFFE6FAF6); // 极浅薄荷
|
||||
static const Color primaryDark = Color(0xFF0F9D8E); // 深薄荷
|
||||
static const Color primary = Color(0xFF8B9CF7); // 淡薰紫
|
||||
static const Color primaryLight = Color(0xFFF0F2FF); // 极淡紫底
|
||||
static const Color primaryDark = Color(0xFF6A7DE0); // 深薰紫
|
||||
|
||||
static const Color bg = Color(0xFFF6F9FB); // 清透底
|
||||
static const Color surface = Color(0xFFFFFFFF); // 卡片白
|
||||
static const Color bg = Color(0xFFF8F9FC); // 清透白底
|
||||
static const Color surface = Color(0xFFFFFFFF); // 纯白卡片
|
||||
|
||||
static const Color text = Color(0xFF1C2B33);
|
||||
static const Color textSub = Color(0xFF6B7C85);
|
||||
static const Color textHint = Color(0xFFA5B4BD);
|
||||
static const Color text = Color(0xFF2D2B32);
|
||||
static const Color textSub = Color(0xFF8A8892);
|
||||
static const Color textHint = Color(0xFFBFBCC4);
|
||||
|
||||
static const Color success = Color(0xFF10B981);
|
||||
static const Color success = Color(0xFF6ECF8A);
|
||||
static const Color error = Color(0xFFF56C6C);
|
||||
static const Color warning = Color(0xFFF59E0B);
|
||||
static const Color accent = Color(0xFFFF7B6B); // 珊瑚
|
||||
static const Color warning = Color(0xFFF5A623);
|
||||
static const Color accent = Color(0xFFFF8068);
|
||||
|
||||
static const Color border = Color(0xFFE5EBF0);
|
||||
static const Color divider = Color(0xFFEEF2F6);
|
||||
static const Color border = Color(0xFFEAEAF0);
|
||||
static const Color divider = Color(0xFFF2F2F6);
|
||||
|
||||
/// 每个智能体的卡片色调
|
||||
static const Map<String, Color> agentColors = {
|
||||
'default': Color(0xFFE8ECFF), // 淡蓝紫
|
||||
'consultation': Color(0xFFE8F5FF), // 淡天蓝
|
||||
'health': Color(0xFFE8FFF0), // 淡薄荷
|
||||
'diet': Color(0xFFFFF2E8), // 淡杏
|
||||
'medication': Color(0xFFFFE8F0), // 淡粉
|
||||
'report': Color(0xFFE8F4FF), // 淡水蓝
|
||||
'exercise': Color(0xFFF0E8FF), // 淡紫
|
||||
};
|
||||
|
||||
static Color agentLight(String? name) => agentColors[name] ?? primaryLight;
|
||||
|
||||
static ThemeData get lightTheme => ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: primary,
|
||||
primary: primary,
|
||||
surface: bg,
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: primary, primary: primary, surface: bg, brightness: Brightness.light),
|
||||
scaffoldBackgroundColor: bg,
|
||||
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: surface,
|
||||
foregroundColor: text,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
scrolledUnderElevation: 0,
|
||||
backgroundColor: surface, foregroundColor: text, elevation: 0,
|
||||
centerTitle: true, scrolledUnderElevation: 0,
|
||||
titleTextStyle: TextStyle(fontSize: 17, fontWeight: FontWeight.w600, color: text),
|
||||
),
|
||||
|
||||
cardTheme: CardThemeData(
|
||||
color: surface,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
margin: EdgeInsets.zero,
|
||||
),
|
||||
cardTheme: CardThemeData(color: surface, elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), margin: EdgeInsets.zero),
|
||||
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: const Color(0xFFF2F6F9),
|
||||
filled: true, fillColor: const Color(0xFFF4F5FA),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none),
|
||||
@@ -59,20 +59,14 @@ class AppTheme {
|
||||
hintStyle: const TextStyle(color: textHint, fontSize: 15),
|
||||
),
|
||||
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primary,
|
||||
foregroundColor: Colors.white,
|
||||
minimumSize: const Size(double.infinity, 48),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
elevation: 0,
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primary, foregroundColor: Colors.white,
|
||||
minimumSize: const Size(double.infinity, 48),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600), elevation: 0,
|
||||
)),
|
||||
|
||||
dialogTheme: DialogThemeData(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(22)),
|
||||
),
|
||||
dialogTheme: DialogThemeData(shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(22))),
|
||||
|
||||
textTheme: const TextTheme(
|
||||
headlineLarge: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: text),
|
||||
|
||||
Reference in New Issue
Block a user