191 lines
5.7 KiB
Dart
191 lines
5.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AppTheme {
|
|
// Primary Colors
|
|
static const Color primary = Color(0xFF4A90E2);
|
|
static const Color primaryLight = Color(0xFF7BB3F0);
|
|
static const Color primaryDark = Color(0xFF2E5C8A);
|
|
|
|
// Category Colors
|
|
static const Color medication = Color(0xFFE74C3C);
|
|
static const Color vitamin = Color(0xFFF39C12);
|
|
static const Color appointment = Color(0xFF9B59B6);
|
|
static const Color sleep = Color(0xFF8E44AD);
|
|
static const Color food = Color(0xFFE67E22);
|
|
static const Color hydration = Color(0xFF3498DB);
|
|
static const Color exercise = Color(0xFF27AE60);
|
|
static const Color hygiene = Color(0xFF1ABC9C);
|
|
static const Color selfCare = Color(0xFF16A085);
|
|
|
|
// Gamification Colors
|
|
static const Color gold = Color(0xFFFFD700);
|
|
static const Color silver = Color(0xFFC0C0C0);
|
|
static const Color bronze = Color(0xFFCD7F32);
|
|
|
|
// Semantic Colors
|
|
static const Color success = Color(0xFF27AE60);
|
|
static const Color warning = Color(0xFFF39C12);
|
|
static const Color error = Color(0xFFE74C3C);
|
|
static const Color info = Color(0xFF3498DB);
|
|
|
|
static Color getCategoryColor(RoutineCategory category) {
|
|
switch (category) {
|
|
case RoutineCategory.medication:
|
|
return medication;
|
|
case RoutineCategory.vitamin:
|
|
return vitamin;
|
|
case RoutineCategory.appointment:
|
|
return appointment;
|
|
case RoutineCategory.sleep:
|
|
return sleep;
|
|
case RoutineCategory.food:
|
|
return food;
|
|
case RoutineCategory.hydration:
|
|
return hydration;
|
|
case RoutineCategory.exercise:
|
|
return exercise;
|
|
case RoutineCategory.hygiene:
|
|
return hygiene;
|
|
case RoutineCategory.selfCare:
|
|
return selfCare;
|
|
case RoutineCategory.custom:
|
|
return primary;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Temporary enum for compilation
|
|
enum RoutineCategory {
|
|
medication,
|
|
vitamin,
|
|
appointment,
|
|
sleep,
|
|
food,
|
|
hydration,
|
|
exercise,
|
|
hygiene,
|
|
selfCare,
|
|
custom,
|
|
}
|
|
|
|
class AppTheme {
|
|
static ThemeData get lightTheme {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.light,
|
|
colorScheme: const ColorScheme.light(
|
|
primary: AppColors.primary,
|
|
secondary: AppColors.primaryLight,
|
|
surface: Colors.white,
|
|
background: Color(0xFFF8F9FA),
|
|
onPrimary: Colors.white,
|
|
onSecondary: Colors.white,
|
|
onSurface: Color(0xFF1A1A2E),
|
|
onBackground: Color(0xFF1A1A2E),
|
|
),
|
|
scaffoldBackgroundColor: const Color(0xFFF8F9FA),
|
|
appBarTheme: const AppBarTheme(
|
|
elevation: 0,
|
|
centerTitle: false,
|
|
backgroundColor: Colors.transparent,
|
|
foregroundColor: Color(0xFF1A1A2E),
|
|
titleTextStyle: TextStyle(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
color: Color(0xFF1A1A2E),
|
|
),
|
|
),
|
|
cardTheme: CardTheme(
|
|
elevation: 2,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
|
backgroundColor: Colors.white,
|
|
selectedItemColor: AppColors.primary,
|
|
unselectedItemColor: Colors.grey,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 8,
|
|
),
|
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
|
backgroundColor: AppColors.primary,
|
|
foregroundColor: Colors.white,
|
|
elevation: 4,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: AppColors.primary,
|
|
foregroundColor: Colors.white,
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: Colors.grey[100],
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderSide: const BorderSide(color: AppColors.primary, width: 2),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
static ThemeData get darkTheme {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: AppColors.primaryLight,
|
|
secondary: AppColors.primary,
|
|
surface: Color(0xFF1E1E2E),
|
|
background: Color(0xFF0F0F1A),
|
|
onPrimary: Colors.white,
|
|
onSecondary: Colors.white,
|
|
onSurface: Colors.white,
|
|
onBackground: Colors.white,
|
|
),
|
|
scaffoldBackgroundColor: const Color(0xFF0F0F1A),
|
|
appBarTheme: const AppBarTheme(
|
|
elevation: 0,
|
|
centerTitle: false,
|
|
backgroundColor: Colors.transparent,
|
|
foregroundColor: Colors.white,
|
|
titleTextStyle: TextStyle(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
cardTheme: CardTheme(
|
|
elevation: 2,
|
|
color: const Color(0xFF1E1E2E),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
|
backgroundColor: Color(0xFF1E1E2E),
|
|
selectedItemColor: AppColors.primaryLight,
|
|
unselectedItemColor: Colors.grey,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 8,
|
|
),
|
|
);
|
|
}
|
|
}
|