@@ -17,17 +17,22 @@ class CreateStudy extends StatefulWidget {
17
17
class _CreateStudy extends State <CreateStudy > {
18
18
bool value = false ;
19
19
int secretGroup = 1 ;
20
- int categoryGroup = 2 ;
20
+ int categoryGroup = 1 ;
21
21
String _dateTime = "DD/MM/YYYY" ;
22
22
Dio dio = createDio ();
23
23
var firstAddressList = [];
24
24
var secondAddressList = [];
25
-
26
25
String firstAddress = "도" ;
27
- String secondAddress = "시" ;
28
26
27
+ String secondAddress = "시" ;
29
28
int recruitCount = 0 ;
30
29
30
+ String _interestStudyType = "스터디 상세 카테고리를 선택해주세요" ;
31
+ var devStudy = ["웹 개발" ,"서버 개발" ,"모바일 개발" ,"데이터사이언스" ,"게임 개발" ,"IoT 개발" ];
32
+ var designStudy = ["BX 디자인" ,"UX/UI 디자인" ,"영상 디자인" ,"3D 디자인" ,"일러스트레이터" ];
33
+ var planningStudy = ["GA 기획" ,"UX 기획" ,"역 기획" ,"3D 디자인" ,"마케팅 기획" ];
34
+
35
+
31
36
@override
32
37
void initState () {
33
38
super .initState ();
@@ -73,7 +78,13 @@ class _CreateStudy extends State<CreateStudy> {
73
78
studyArea (context),
74
79
SizedBox (height: 28 ),
75
80
studyCategoryText (),
76
- studyCategory ()
81
+ SizedBox (height: 11 ),
82
+ studyCategory (),
83
+ SizedBox (height: 29 ),
84
+ interestStudyTypeText (),
85
+ SizedBox (height: 9 ),
86
+ interestStudyType (),
87
+ SizedBox (height: 40 )
77
88
],
78
89
),
79
90
),
@@ -85,6 +96,76 @@ class _CreateStudy extends State<CreateStudy> {
85
96
);
86
97
}
87
98
99
+ void selectInterestStudyType (){
100
+ var currentStudyItems = [];
101
+ switch (categoryGroup){
102
+ case 1 :
103
+ currentStudyItems = planningStudy;
104
+ break ;
105
+ case 2 :
106
+ currentStudyItems = designStudy;
107
+ break ;
108
+ case 3 :
109
+ currentStudyItems = devStudy;
110
+ break ;
111
+ }
112
+ showModalBottomSheet (
113
+ context: context,
114
+ builder: (BuildContext bc) {
115
+ return ListView .builder (
116
+ padding: EdgeInsets .all (10 ),
117
+ itemCount: currentStudyItems.length,
118
+ itemBuilder: (BuildContext context, int index) {
119
+ return GestureDetector (
120
+ onTap: () {
121
+ Navigator .pop (context);
122
+ setState (() {
123
+ _interestStudyType = currentStudyItems[index];
124
+ });
125
+ },
126
+ child: Padding (
127
+ padding: const EdgeInsets .all (8.0 ),
128
+ child: Text (currentStudyItems[index],
129
+ style: TextStyle (fontSize: 20 )),
130
+ ));
131
+ });
132
+ });
133
+ }
134
+
135
+ Widget interestStudyType (){
136
+ return GestureDetector (
137
+ onTap: () {
138
+ selectInterestStudyType ();
139
+ },
140
+ child: Container (
141
+ margin: const EdgeInsets .only (top: 8 ),
142
+ decoration: BoxDecoration (
143
+ border: Border .all (color: Color .fromRGBO (47 , 55 , 51 , 1 ))),
144
+ child: Padding (
145
+ padding:
146
+ const EdgeInsets .only (top: 11 , bottom: 11 , left: 12 , right: 12 ),
147
+ child: Row (
148
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
149
+ children: < Widget > [
150
+ Text (_interestStudyType,
151
+ style: TextStyle (
152
+ fontSize: 13 ,
153
+ color: (_interestStudyType == "스터디 상세 카테고리를 선택해주세요" )
154
+ ? Color .fromRGBO (141 , 140 , 143 , 1 )
155
+ : Colors .white)),
156
+ Icon (Icons .arrow_drop_down,
157
+ color: Color .fromRGBO (141 , 140 , 143 , 1 ))
158
+ ],
159
+ ),
160
+ ),
161
+ ),
162
+ );
163
+ }
164
+
165
+ Widget interestStudyTypeText () => Text ("관심 분야 선택" ,
166
+ style: TextStyle (
167
+ color: Colors .white, fontSize: 15 , fontWeight: FontWeight .bold));
168
+
88
169
Widget studyCategory () {
89
170
return Theme (
90
171
data: ThemeData .dark (),
@@ -184,50 +265,50 @@ class _CreateStudy extends State<CreateStudy> {
184
265
children: < Widget > [
185
266
Expanded (
186
267
flex: 1 ,
187
- child: Container (
188
- decoration : BoxDecoration (
189
- border : Border . all (color : Color . fromRGBO ( 47 , 51 , 55 , 1 ))),
190
- child : Padding (
191
- padding : const EdgeInsets . only (
192
- left : 12 , right : 12 , top : 10 , bottom : 10 ),
193
- child : Row (
194
- mainAxisAlignment : MainAxisAlignment .spaceBetween,
195
- children : < Widget > [
196
- GestureDetector (
197
- onTap : () {
198
- _showFirstAddressBottomSheet (context);
199
- },
200
- child : Text (firstAddress,
268
+ child: GestureDetector (
269
+ onTap : () {
270
+ _showFirstAddressBottomSheet (context);
271
+ },
272
+ child : Container (
273
+ decoration : BoxDecoration (
274
+ border : Border . all (color : Color . fromRGBO ( 47 , 51 , 55 , 1 ))),
275
+ child : Padding (
276
+ padding : const EdgeInsets . only (
277
+ left : 12 , right : 12 , top : 10 , bottom : 10 ),
278
+ child : Row (
279
+ mainAxisAlignment : MainAxisAlignment .spaceBetween,
280
+ children : < Widget > [
281
+ Text (firstAddress,
201
282
style: TextStyle (
202
283
fontSize: 13 ,
203
284
color: Color .fromRGBO (141 , 140 , 143 , 1 ))),
204
- ),
205
- Icon ( Icons .arrow_drop_down, color : Colors .white)
206
- ] ,
285
+ Icon ( Icons .arrow_drop_down, color : Colors .white)
286
+ ],
287
+ ) ,
207
288
),
208
289
),
209
290
),
210
291
),
211
292
SizedBox (width: 13 ),
212
293
Expanded (
213
294
flex: 1 ,
214
- child: Container (
215
- decoration : BoxDecoration (
216
- border : Border . all (color : Color . fromRGBO ( 47 , 51 , 55 , 1 ))),
217
- child : GestureDetector (
218
- onTap : () {
219
- if (secondAddressList.isEmpty) {
220
- Fluttertoast . showToast (
221
- msg : "지역을 먼저 선택해주세요." ,
222
- toastLength : Toast . LENGTH_SHORT ,
223
- gravity : ToastGravity . CENTER ,
224
- timeInSecForIosWeb : 1 ,
225
- textColor : Colors .white,
226
- fontSize : 16.0 );
227
- } else {
228
- _showSecondAddressBottomSheet (context);
229
- }
230
- } ,
295
+ child: GestureDetector (
296
+ onTap : () {
297
+ if (secondAddressList.isEmpty) {
298
+ Fluttertoast . showToast (
299
+ msg : "지역을 먼저 선택해주세요." ,
300
+ toastLength : Toast . LENGTH_SHORT ,
301
+ gravity : ToastGravity . CENTER ,
302
+ timeInSecForIosWeb : 1 ,
303
+ textColor : Colors .white ,
304
+ fontSize : 16.0 );
305
+ } else {
306
+ _showSecondAddressBottomSheet (context);
307
+ }
308
+ },
309
+ child : Container (
310
+ decoration : BoxDecoration (
311
+ border : Border . all (color : Color . fromRGBO ( 47 , 51 , 55 , 1 ))) ,
231
312
child: Padding (
232
313
padding: const EdgeInsets .only (
233
314
left: 12 , right: 12 , top: 10 , bottom: 10 ),
@@ -517,6 +598,7 @@ class _CreateStudy extends State<CreateStudy> {
517
598
primaryColor: Color .fromRGBO (47 , 55 , 51 , 1 ),
518
599
hintColor: Colors .yellow),
519
600
child: TextFormField (
601
+ style: TextStyle (fontSize: 13 ,color: Colors .white),
520
602
textAlignVertical: TextAlignVertical .center,
521
603
decoration: InputDecoration (
522
604
isDense: true ,
@@ -551,7 +633,7 @@ class _CreateStudy extends State<CreateStudy> {
551
633
),
552
634
SizedBox (width: 4 ),
553
635
Text (
554
- "(0/20 )" ,
636
+ "(0/200 )" ,
555
637
style: TextStyle (
556
638
color: Color .fromRGBO (177 , 177 , 177 , 1 ), fontSize: 13 ),
557
639
),
@@ -569,6 +651,7 @@ class _CreateStudy extends State<CreateStudy> {
569
651
primaryColor: Color .fromRGBO (47 , 55 , 51 , 1 ),
570
652
hintColor: Colors .yellow),
571
653
child: TextField (
654
+ style: TextStyle (fontSize: 13 ,color: Colors .white),
572
655
expands: true ,
573
656
maxLines: null ,
574
657
maxLength: 200 ,
0 commit comments