188 lines
6.3 KiB
Dart
188 lines
6.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class VoIdeaColors {
|
|
VoIdeaColors._();
|
|
|
|
static const Color primary = Color(0xFF2563EB);
|
|
static const Color primaryLight = Color(0xFF60A5FA);
|
|
static const Color primaryDark = Color(0xFF1D4ED8);
|
|
static const Color secondary = Color(0xFF7C3AED);
|
|
static const Color surface = Color(0xFFF8FAFC);
|
|
static const Color surfaceDark = Color(0xFF0F172A);
|
|
static const Color background = Color(0xFFFFFFFF);
|
|
static const Color backgroundDark = Color(0xFF020617);
|
|
static const Color error = Color(0xFFEF4444);
|
|
static const Color success = Color(0xFF22C55E);
|
|
static const Color warning = Color(0xFFF59E0B);
|
|
static const Color onPrimary = Color(0xFFFFFFFF);
|
|
static const Color onSurface = Color(0xFF1E293B);
|
|
static const Color onSurfaceDark = Color(0xFFE2E8F0);
|
|
static const Color muted = Color(0xFF94A3B8);
|
|
}
|
|
|
|
class AppTheme {
|
|
AppTheme._();
|
|
|
|
static ThemeData light() {
|
|
final colorScheme = ColorScheme.light(
|
|
primary: VoIdeaColors.primary,
|
|
primaryContainer: VoIdeaColors.primaryLight,
|
|
onPrimary: VoIdeaColors.onPrimary,
|
|
secondary: VoIdeaColors.secondary,
|
|
surface: VoIdeaColors.surface,
|
|
onSurface: VoIdeaColors.onSurface,
|
|
error: VoIdeaColors.error,
|
|
);
|
|
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: colorScheme,
|
|
scaffoldBackgroundColor: VoIdeaColors.background,
|
|
appBarTheme: AppBarTheme(
|
|
backgroundColor: VoIdeaColors.background,
|
|
foregroundColor: VoIdeaColors.onSurface,
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
titleTextStyle: TextStyle(
|
|
color: VoIdeaColors.onSurface,
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
|
backgroundColor: VoIdeaColors.background,
|
|
selectedItemColor: VoIdeaColors.primary,
|
|
unselectedItemColor: VoIdeaColors.muted,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 8,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: VoIdeaColors.background,
|
|
elevation: 1,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: VoIdeaColors.primary,
|
|
foregroundColor: VoIdeaColors.onPrimary,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: VoIdeaColors.surface,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide(color: VoIdeaColors.muted.withOpacity(0.3)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: const BorderSide(color: VoIdeaColors.primary, width: 2),
|
|
),
|
|
contentPadding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
),
|
|
dividerTheme: DividerThemeData(
|
|
color: VoIdeaColors.muted.withOpacity(0.2),
|
|
thickness: 1,
|
|
),
|
|
chipTheme: ChipThemeData(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
static ThemeData dark() {
|
|
final colorScheme = ColorScheme.dark(
|
|
primary: VoIdeaColors.primaryLight,
|
|
primaryContainer: VoIdeaColors.primaryDark,
|
|
onPrimary: VoIdeaColors.onPrimary,
|
|
secondary: VoIdeaColors.secondary,
|
|
surface: VoIdeaColors.surfaceDark,
|
|
onSurface: VoIdeaColors.onSurfaceDark,
|
|
error: VoIdeaColors.error,
|
|
);
|
|
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: colorScheme,
|
|
scaffoldBackgroundColor: VoIdeaColors.backgroundDark,
|
|
appBarTheme: AppBarTheme(
|
|
backgroundColor: VoIdeaColors.backgroundDark,
|
|
foregroundColor: VoIdeaColors.onSurfaceDark,
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
titleTextStyle: TextStyle(
|
|
color: VoIdeaColors.onSurfaceDark,
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
|
backgroundColor: VoIdeaColors.backgroundDark,
|
|
selectedItemColor: VoIdeaColors.primaryLight,
|
|
unselectedItemColor: VoIdeaColors.muted,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 8,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: VoIdeaColors.surfaceDark,
|
|
elevation: 1,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: VoIdeaColors.primaryLight,
|
|
foregroundColor: VoIdeaColors.onPrimary,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: VoIdeaColors.surfaceDark,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide:
|
|
BorderSide(color: VoIdeaColors.muted.withOpacity(0.3)),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide:
|
|
const BorderSide(color: VoIdeaColors.primaryLight, width: 2),
|
|
),
|
|
contentPadding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
),
|
|
dividerTheme: DividerThemeData(
|
|
color: VoIdeaColors.muted.withOpacity(0.2),
|
|
thickness: 1,
|
|
),
|
|
chipTheme: ChipThemeData(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|