1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:google_fonts/google_fonts.dart' ;
2
3
3
4
//primaryColor 지정 (색상코드: #6E3647)
4
5
final Map <int , Color > primaryColor1 = {
@@ -22,10 +23,9 @@ const Color toastTextColor = Colors.black;
22
23
const Color notiColor = Color (0x66C8C8C8 );
23
24
final Color dialogBarrierColor = Colors .black.withOpacity (0.6 );
24
25
25
- //아래의 상수들은 피그마 기준 상의 패딩 픽셀과는 차이를 두고 있지만,
26
- //이는 모바일 환경상 웹뷰와 같은 간격을 제시하기 위해 설정한 값들입니다.
27
26
double devicePixelRatio = 3.0 ;
28
- const double dialogPadding = 15.0 ;
27
+ const double taxiDialogPadding = 15.0 ;
28
+ const double taxiNotificationPadding = 20.0 ;
29
29
final defaultDialogUpperTitlePadding =
30
30
Padding (padding: EdgeInsets .symmetric (vertical: 36.0 / devicePixelRatio));
31
31
@@ -37,22 +37,42 @@ final defaultDialogLowerTitlePadding =
37
37
38
38
final defaultDialogVerticalMedianButtonPadding = Padding (
39
39
padding:
40
- EdgeInsets .symmetric (horizontal: dialogPadding / devicePixelRatio));
40
+ EdgeInsets .symmetric (horizontal: taxiDialogPadding / devicePixelRatio));
41
41
42
42
final defaultDialogLowerButtonPadding = Padding (
43
- padding: EdgeInsets .only (bottom: (dialogPadding / 2 ) / devicePixelRatio));
43
+ padding:
44
+ EdgeInsets .only (bottom: (taxiDialogPadding / 2 ) / devicePixelRatio));
44
45
45
46
final defaultDialogPadding =
46
- Padding (padding: EdgeInsets .all (dialogPadding / devicePixelRatio));
47
+ Padding (padding: EdgeInsets .all (taxiDialogPadding / devicePixelRatio));
47
48
48
49
final defaultDialogButtonSize = Size (147.50 , 35 );
49
50
50
- final defaultDialogButtonInnerPadding =
51
- EdgeInsets .symmetric (vertical: 9 , horizontal: 15 );
51
+ final defaultDialogButtonInnerPadding = EdgeInsets .only (top: 9 , bottom: 9 );
52
52
53
53
final defaultDialogButtonBorderRadius = BorderRadius .circular (8.0 );
54
54
55
- ThemeData buildTheme () {
55
+ final defaultTaxiMarginDouble = 20.0 ;
56
+
57
+ final defaultTaxiMargin =
58
+ EdgeInsets .symmetric (horizontal: defaultTaxiMarginDouble);
59
+
60
+ const defaultNotificationButtonSize = Size (90 , 25 );
61
+ const defaultNotificationButtonInnerPadding =
62
+ EdgeInsets .symmetric (horizontal: 15.0 , vertical: 2.0 );
63
+ final defaultNotificationButtonBorderRadius = BorderRadius .circular (30.0 );
64
+ final defaultNotificatonOutlinedButtonStyle = OutlinedButton .styleFrom (
65
+ minimumSize: Size .zero,
66
+ fixedSize: defaultNotificationButtonSize,
67
+ padding: defaultNotificationButtonInnerPadding,
68
+ backgroundColor: taxiPrimaryMaterialColor,
69
+ shape: RoundedRectangleBorder (
70
+ borderRadius: defaultNotificationButtonBorderRadius,
71
+ side: const BorderSide (color: Colors .black),
72
+ ),
73
+ ); // TODO: ThemeData에 있는 OutlinedButtonThemeData 분리
74
+
75
+ ThemeData taxiTheme () {
56
76
final base = ThemeData (
57
77
primarySwatch: taxiPrimaryMaterialColor,
58
78
primaryColor: const Color (0xFF6E3678 ),
@@ -61,7 +81,7 @@ ThemeData buildTheme() {
61
81
dialogTheme: DialogTheme (
62
82
shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (15 )),
63
83
backgroundColor: Colors .white,
64
- actionsPadding: EdgeInsets .all (dialogPadding / devicePixelRatio ),
84
+ actionsPadding: const EdgeInsets .all (10.0 ),
65
85
surfaceTintColor: Colors .black,
66
86
),
67
87
dialogBackgroundColor: Colors .white,
@@ -89,36 +109,65 @@ ThemeData buildTheme() {
89
109
),
90
110
),
91
111
),
112
+ bannerTheme: MaterialBannerThemeData (
113
+ backgroundColor: Colors .white,
114
+ ),
92
115
93
116
//텍스트 테마
94
117
textTheme: const TextTheme (
95
- //Dialog 제목
96
- titleSmall: TextStyle (
97
- fontFamily: 'NanumSquare' ,
98
- color: Color (0xFF323232 ),
99
- fontSize: 16 ,
100
- fontWeight: FontWeight .w400),
101
-
102
- //Dialog 상세 설명
103
- bodySmall: TextStyle (
104
- fontFamily: 'NanumSquare_acB' ,
105
- color: Color (0xFF888888 ),
106
- fontSize: 10 ,
107
- fontWeight: FontWeight .w700),
108
-
109
- //Dialog Outlined 버튼 텍스트
110
- labelLarge: TextStyle (
111
- fontFamily: 'NanumSquare_acB' ,
112
- color: Color (0xFFEEEEEE ),
113
- fontSize: 13 ,
114
- fontWeight: FontWeight .w700),
115
-
116
- //Dialog Elevated 버튼 텍스트
117
- labelMedium: TextStyle (
118
- fontFamily: 'NanumSquare' ,
119
- color: Color .fromARGB (255 , 129 , 129 , 129 ),
120
- fontSize: 13 ,
121
- fontWeight: FontWeight .w400)),
118
+ //Dialog 제목
119
+ titleSmall: TextStyle (
120
+ fontFamily: 'NanumSquare' ,
121
+ color: Color (0xFF323232 ),
122
+ fontSize: 16 ,
123
+ fontWeight: FontWeight .w400),
124
+
125
+ //Dialog 상세 설명
126
+ bodySmall: TextStyle (
127
+ fontFamily: 'NanumSquare_acB' ,
128
+ color: Color (0xFF888888 ),
129
+ fontSize: 10 ,
130
+ fontWeight: FontWeight .w700),
131
+
132
+ //Dialog Outlined 버튼 텍스트
133
+ labelLarge: TextStyle (
134
+ fontFamily: 'NanumSquare_acB' ,
135
+ color: Color (0xFFEEEEEE ),
136
+ fontSize: 14 ,
137
+ fontWeight: FontWeight .w700),
138
+
139
+ //Dialog Elevated 버튼 텍스트
140
+ labelMedium: TextStyle (
141
+ fontFamily: 'NanumSquare' ,
142
+ color: Color .fromARGB (255 , 129 , 129 , 129 ),
143
+ fontSize: 14 ,
144
+ fontWeight: FontWeight .w400),
145
+ labelSmall: TextStyle (
146
+ color: Color (0xFFEEEEEE ),
147
+ fontFamily: 'NanumSquare_acB' ,
148
+ fontSize: 12 ,
149
+ fontWeight: FontWeight .w700,
150
+ letterSpacing: 0.4 ,
151
+ ),
152
+ ),
153
+
154
+ bottomNavigationBarTheme: BottomNavigationBarThemeData (
155
+ type: BottomNavigationBarType .fixed,
156
+ backgroundColor: Colors .white,
157
+ selectedItemColor: Color (0xFF6E3678 ),
158
+ selectedLabelStyle: TextStyle (
159
+ fontFamily: 'NanumSquare' ,
160
+ fontSize: 12 ,
161
+ fontWeight: FontWeight .w700,
162
+ letterSpacing: 0.4 ,
163
+ ),
164
+ unselectedLabelStyle: TextStyle (
165
+ fontFamily: 'NanumSquare' ,
166
+ fontSize: 12 ,
167
+ fontWeight: FontWeight .w700,
168
+ letterSpacing: 0.4 ,
169
+ ),
170
+ ),
122
171
);
123
172
return base ;
124
173
}
0 commit comments