- Backend: .NET 10 Minimal API + EF Core + PostgreSQL - Frontend: Flutter + Riverpod + GoRouter + Dio - AI: DeepSeek LLM + Qwen VLM (OpenAI-compatible) - Auth: SMS + JWT (access/refresh tokens) - Features: AI chat, health tracking, medication management, diet analysis, exercise plans, doctor consultations, report analysis
78 lines
3.4 KiB
Dart
78 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// 健康管家主题配置——薰衣草紫 + 温暖治愈风
|
|
class AppTheme {
|
|
AppTheme._();
|
|
|
|
static const Color primaryColor = Color(0xFF635BFF);
|
|
static const Color primaryLight = Color(0xFFEDEBFF);
|
|
static const Color primaryDark = Color(0xFF4B44D6);
|
|
static const Color background = Color(0xFFF8F9FF);
|
|
static const Color cardWhite = Color(0xFFFFFFFF);
|
|
static const Color textPrimary = Color(0xFF1A1A1A);
|
|
static const Color textSecondary = Color(0xFF666666);
|
|
static const Color textPlaceholder = Color(0xFF999999);
|
|
static const Color successGreen = Color(0xFF43A047);
|
|
static const Color errorRed = Color(0xFFE53935);
|
|
static const Color warningYellow = Color(0xFFF9A825);
|
|
static const Color secondaryButton = Color(0xFFE5E5F7);
|
|
|
|
static ThemeData get lightTheme => ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: primaryColor,
|
|
primary: primaryColor,
|
|
surface: background,
|
|
brightness: Brightness.light,
|
|
),
|
|
scaffoldBackgroundColor: background,
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: cardWhite,
|
|
foregroundColor: textPrimary,
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: cardWhite,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
|
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: cardWhite,
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: secondaryButton, width: 1.5),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: secondaryButton, width: 1.5),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: primaryColor, width: 1.5),
|
|
),
|
|
hintStyle: const TextStyle(color: textPlaceholder, fontSize: 16),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: primaryColor,
|
|
foregroundColor: Colors.white,
|
|
minimumSize: const Size(double.infinity, 48),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
|
|
textStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
|
|
),
|
|
),
|
|
textTheme: const TextTheme(
|
|
headlineLarge: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: textPrimary),
|
|
titleLarge: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: textPrimary),
|
|
bodyLarge: TextStyle(fontSize: 18, fontWeight: FontWeight.w400, color: textPrimary),
|
|
bodyMedium: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: textSecondary),
|
|
labelMedium: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: textSecondary),
|
|
labelSmall: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: textSecondary),
|
|
),
|
|
);
|
|
}
|