Skip to content

Commit 2a1db8c

Browse files
committed
newlook
1 parent 4dfc3fa commit 2a1db8c

1 file changed

Lines changed: 76 additions & 64 deletions

File tree

lib/theme/my_theme.dart

Lines changed: 76 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -4,87 +4,90 @@ import 'package:google_fonts/google_fonts.dart';
44

55
class MyTheme {
66
static final TextTheme _appTextTheme = TextTheme(
7-
displayLarge: GoogleFonts.poppins(fontSize: 57, fontWeight: FontWeight.bold, color: Colors.black87),
8-
displayMedium: GoogleFonts.poppins(fontSize: 45, fontWeight: FontWeight.bold, color: Colors.black87),
9-
displaySmall: GoogleFonts.poppins(fontSize: 36, fontWeight: FontWeight.bold, color: Colors.black87),
10-
headlineLarge: GoogleFonts.poppins(fontSize: 32, fontWeight: FontWeight.bold, color: Colors.black87),
11-
headlineMedium: GoogleFonts.poppins(fontSize: 28, fontWeight: FontWeight.w600, color: Colors.black87),
12-
headlineSmall: GoogleFonts.poppins(fontSize: 24, fontWeight: FontWeight.w600, color: Colors.black87),
13-
titleLarge: GoogleFonts.lato(fontSize: 22, fontWeight: FontWeight.w700, color: Colors.black87),
14-
titleMedium: GoogleFonts.lato(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.black87),
15-
titleSmall: GoogleFonts.lato(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.black87),
16-
bodyLarge: GoogleFonts.openSans(fontSize: 16, color: Colors.black87),
17-
bodyMedium: GoogleFonts.openSans(fontSize: 14, color: Colors.black87),
18-
bodySmall: GoogleFonts.openSans(fontSize: 12, color: Colors.black87),
19-
labelLarge: GoogleFonts.openSans(fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white),
20-
labelMedium: GoogleFonts.openSans(fontSize: 12, color: Colors.black87),
21-
labelSmall: GoogleFonts.openSans(fontSize: 11, color: Colors.black87),
7+
displayLarge: GoogleFonts.inter(fontSize: 57, fontWeight: FontWeight.w700, color: Colors.grey.shade900),
8+
displayMedium: GoogleFonts.inter(fontSize: 45, fontWeight: FontWeight.w700, color: Colors.grey.shade900),
9+
displaySmall: GoogleFonts.inter(fontSize: 36, fontWeight: FontWeight.w700, color: Colors.grey.shade900),
10+
headlineLarge: GoogleFonts.manrope(fontSize: 32, fontWeight: FontWeight.w700, color: Colors.grey.shade900),
11+
headlineMedium: GoogleFonts.manrope(fontSize: 28, fontWeight: FontWeight.w600, color: Colors.grey.shade900),
12+
headlineSmall: GoogleFonts.manrope(fontSize: 24, fontWeight: FontWeight.w600, color: Colors.grey.shade900),
13+
titleLarge: GoogleFonts.manrope(fontSize: 22, fontWeight: FontWeight.w700, color: Colors.grey.shade900),
14+
titleMedium: GoogleFonts.manrope(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.grey.shade900),
15+
titleSmall: GoogleFonts.manrope(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.grey.shade900),
16+
bodyLarge: GoogleFonts.inter(fontSize: 16, color: Colors.grey.shade800),
17+
bodyMedium: GoogleFonts.inter(fontSize: 14, color: Colors.grey.shade800),
18+
bodySmall: GoogleFonts.inter(fontSize: 12, color: Colors.grey.shade700),
19+
labelLarge: GoogleFonts.inter(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.white),
20+
labelMedium: GoogleFonts.inter(fontSize: 12, color: Colors.grey.shade700),
21+
labelSmall: GoogleFonts.inter(fontSize: 11, color: Colors.grey.shade600),
2222
);
2323

2424
static ThemeData lightTheme = ThemeData(
2525
useMaterial3: true,
26-
fontFamily: GoogleFonts.openSans().fontFamily,
26+
fontFamily: GoogleFonts.inter().fontFamily,
2727
colorScheme: ColorScheme.fromSeed(
28-
seedColor: const Color(0xFF6200EE), // Deep Purple, a vibrant yet professional color
28+
seedColor: const Color(0xFF6C63FF), // A soft, modern violet
2929
brightness: Brightness.light,
30-
primary: const Color(0xFF6200EE), // Primary color
30+
primary: const Color(0xFF6C63FF),
3131
onPrimary: Colors.white,
32-
primaryContainer: const Color(0xFFBB86FC),
33-
onPrimaryContainer: Colors.black,
34-
secondary: const Color(0xFF03DAC6), // Teal accent
35-
onSecondary: Colors.black,
36-
secondaryContainer: const Color(0xFF03DAC6),
37-
onSecondaryContainer: Colors.black,
38-
tertiary: const Color(0xFF00C853), // Green for success/completion
32+
primaryContainer: const Color(0xFFE0DFFF),
33+
onPrimaryContainer: Colors.grey.shade900,
34+
secondary: const Color(0xFF00C853), // A fresh green
35+
onSecondary: Colors.white,
36+
secondaryContainer: const Color(0xFFB9F6CA),
37+
onSecondaryContainer: Colors.grey.shade900,
38+
tertiary: const Color(0xFFFFAB40), // An energetic orange
3939
onTertiary: Colors.white,
40-
error: const Color(0xFFB00020), // Red for errors
40+
error: const Color(0xFFEF5350), // A gentle red for errors
4141
onError: Colors.white,
42-
background: Colors.white, // Pure white background
43-
onBackground: Colors.black,
44-
surface: const Color(0xFFFFFFFF), // White surface for cards/sheets
45-
onSurface: Colors.black,
46-
surfaceVariant: const Color(0xFFF0F0F0), // Light grey for subtle separation
47-
onSurfaceVariant: Colors.black54,
48-
outline: Colors.grey.shade300, // Light grey outline
49-
shadow: Colors.black.withOpacity(0.1),
50-
inverseSurface: const Color(0xFF121212),
42+
background: const Color(0xFFF5F7FA), // Light, subtle background
43+
onBackground: Colors.grey.shade900,
44+
surface: const Color(0xFFFFFFFF), // Crisp white surface
45+
onSurface: Colors.grey.shade900,
46+
surfaceVariant: const Color(0xFFE8ECF1), // Slightly darker grey for subtle separation
47+
onSurfaceVariant: Colors.grey.shade700,
48+
outline: Colors.grey.shade300,
49+
shadow: Colors.black.withOpacity(0.08),
50+
inverseSurface: Colors.grey.shade900,
5151
onInverseSurface: Colors.white,
52-
inversePrimary: const Color(0xFFBB86FC),
52+
inversePrimary: const Color(0xFFBBDEFB),
5353
),
5454
textTheme: _appTextTheme,
5555
appBarTheme: AppBarTheme(
56-
backgroundColor: Colors.white,
57-
foregroundColor: Colors.black87,
56+
backgroundColor: const Color(0xFFF5F7FA),
57+
foregroundColor: Colors.grey.shade900,
5858
elevation: 0,
5959
centerTitle: false,
60-
titleTextStyle: _appTextTheme.headlineMedium!.copyWith(color: Colors.black87),
61-
iconTheme: const IconThemeData(color: Colors.black87),
60+
titleTextStyle: _appTextTheme.headlineSmall!.copyWith(color: Colors.grey.shade900, fontWeight: FontWeight.w700),
61+
iconTheme: IconThemeData(color: Colors.grey.shade700),
6262
),
6363
elevatedButtonTheme: ElevatedButtonThemeData(
6464
style: ElevatedButton.styleFrom(
6565
foregroundColor: Colors.white,
66-
backgroundColor: const Color(0xFF6200EE),
67-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
68-
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
66+
backgroundColor: const Color(0xFF6C63FF),
67+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), // More rounded
68+
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 16),
6969
textStyle: _appTextTheme.labelLarge,
70-
elevation: 4, // Multi-layered drop shadow
70+
elevation: 6,
71+
shadowColor: Colors.black.withOpacity(0.15),
7172
),
7273
),
7374
textButtonTheme: TextButtonThemeData(
7475
style: TextButton.styleFrom(
75-
foregroundColor: const Color(0xFF6200EE),
76-
textStyle: _appTextTheme.titleSmall!.copyWith(fontWeight: FontWeight.bold),
76+
foregroundColor: const Color(0xFF6C63FF),
77+
textStyle: _appTextTheme.titleSmall!.copyWith(fontWeight: FontWeight.w600),
7778
),
7879
),
7980
floatingActionButtonTheme: FloatingActionButtonThemeData(
80-
backgroundColor: const Color(0xFF03DAC6), // Teal accent
81+
backgroundColor: const Color(0xFF00C853),
8182
foregroundColor: Colors.white,
82-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
83-
elevation: 6, // Strong sense of depth
83+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(18)), // Rounded square FAB
84+
elevation: 8,
85+
highlightElevation: 12,
86+
splashColor: Colors.white.withOpacity(0.2),
8487
),
8588
inputDecorationTheme: InputDecorationTheme(
8689
filled: true,
87-
fillColor: const Color(0xFFF7F7F7), // Light grey background for input fields
90+
fillColor: Colors.white, // White background for input fields
8891
border: OutlineInputBorder(
8992
borderRadius: BorderRadius.circular(12),
9093
borderSide: BorderSide.none,
@@ -95,35 +98,44 @@ class MyTheme {
9598
),
9699
focusedBorder: OutlineInputBorder(
97100
borderRadius: BorderRadius.circular(12),
98-
borderSide: const BorderSide(color: Color(0xFF6200EE), width: 2),
101+
borderSide: const BorderSide(color: Color(0xFF6C63FF), width: 2), // Primary color highlight
99102
),
100-
labelStyle: _appTextTheme.bodyMedium!.copyWith(color: Colors.black54),
101-
hintStyle: _appTextTheme.bodySmall!.copyWith(color: Colors.grey),
102-
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
103+
labelStyle: _appTextTheme.bodyMedium!.copyWith(color: Colors.grey.shade600),
104+
hintStyle: _appTextTheme.bodySmall!.copyWith(color: Colors.grey.shade400),
105+
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 18),
103106
),
104107
cardTheme: CardThemeData(
105-
elevation: 8, // Soft, deep shadow to look "lifted"
106-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
107-
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
108+
elevation: 10, // Stronger, multi-layered shadow
109+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), // Very rounded corners
110+
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
108111
color: Colors.white,
109-
shadowColor: Colors.black.withOpacity(0.15),
112+
shadowColor: Colors.black.withOpacity(0.18),
110113
),
111114
checkboxTheme: CheckboxThemeData(
112115
fillColor: WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
113116
if (states.contains(WidgetState.selected)) {
114-
return const Color(0xFF03DAC6); // Teal when selected
117+
return const Color(0xFF00C853); // Fresh green when selected
115118
}
116-
return Colors.grey.shade400; // Grey when not selected
119+
return Colors.grey.shade300; // Lighter grey when not selected
117120
}),
118-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)),
121+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), // Slightly rounded checkbox
119122
checkColor: WidgetStateProperty.all(Colors.white),
120123
),
121124
snackBarTheme: SnackBarThemeData(
122-
backgroundColor: Colors.black87,
125+
backgroundColor: Colors.grey.shade900,
123126
contentTextStyle: _appTextTheme.bodyMedium!.copyWith(color: Colors.white),
124-
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
127+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
125128
behavior: SnackBarBehavior.floating,
126-
elevation: 6,
129+
elevation: 8,
130+
),
131+
bottomNavigationBarTheme: BottomNavigationBarThemeData(
132+
backgroundColor: Colors.white,
133+
selectedItemColor: const Color(0xFF6C63FF),
134+
unselectedItemColor: Colors.grey.shade500,
135+
elevation: 8,
136+
type: BottomNavigationBarType.fixed,
137+
selectedLabelStyle: _appTextTheme.labelSmall!.copyWith(fontWeight: FontWeight.w600),
138+
unselectedLabelStyle: _appTextTheme.labelSmall,
127139
),
128140
);
129141
}

0 commit comments

Comments
 (0)