-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
116 lines (113 loc) · 4.12 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import 'package:flutter/material.dart';
import 'package:wallet_guard/widgets/expenses.dart';
var kDarkColorScheme = ColorScheme.fromSeed(
seedColor: const Color.fromARGB(255, 18, 80, 122),
brightness: Brightness.dark,
);
var kLightColorScheme = ColorScheme.fromSeed(
seedColor: const Color.fromARGB(255, 18, 80, 122),
brightness: Brightness.light,
);
void main() {
// WidgetsFlutterBinding.ensureInitialized();
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,
// ]).then((fn) {
runApp(
MaterialApp(
themeMode: ThemeMode.system,
theme: ThemeData.light().copyWith(
colorScheme: kLightColorScheme,
appBarTheme: AppBarTheme(
backgroundColor: kLightColorScheme.primary,
foregroundColor: kLightColorScheme.onPrimary,
titleTextStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: kLightColorScheme.onPrimary,
),
),
cardTheme: CardTheme(
color: kLightColorScheme.primaryContainer,
margin: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 16,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: kLightColorScheme.secondaryContainer,
foregroundColor: kLightColorScheme.onSecondaryContainer,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
backgroundColor: kLightColorScheme.secondaryContainer,
foregroundColor: kLightColorScheme.onSecondaryContainer,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
backgroundColor: kLightColorScheme.secondaryContainer,
foregroundColor: kLightColorScheme.onSecondaryContainer,
side: BorderSide(color: kLightColorScheme.onSecondaryContainer),
),
),
textTheme: ThemeData.light().textTheme.copyWith(
titleLarge: TextStyle(
fontWeight: FontWeight.bold,
color: kLightColorScheme.onSecondaryContainer,
fontSize: 18,
),
),
),
darkTheme: ThemeData.dark().copyWith(
colorScheme: kDarkColorScheme,
appBarTheme: AppBarTheme(
backgroundColor: kDarkColorScheme.secondaryContainer,
foregroundColor: kDarkColorScheme.onSecondaryContainer,
titleTextStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: kDarkColorScheme.onSecondaryContainer,
),
),
cardTheme: CardTheme(
color: kDarkColorScheme.secondaryContainer,
margin: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 16,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: kDarkColorScheme.secondaryContainer,
foregroundColor: kDarkColorScheme.onSecondaryContainer,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
backgroundColor: kDarkColorScheme.secondaryContainer,
foregroundColor: kDarkColorScheme.onSecondaryContainer,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
backgroundColor: kDarkColorScheme.secondaryContainer,
foregroundColor: kDarkColorScheme.onSecondaryContainer,
side: BorderSide(color: kDarkColorScheme.onSecondaryContainer),
),
),
textTheme: ThemeData.dark().textTheme.copyWith(
titleLarge: TextStyle(
fontWeight: FontWeight.bold,
color: kDarkColorScheme.onSecondaryContainer,
fontSize: 18,
),
),
),
home: const Expenses(),
),
);
// });
}