Skip to content

Commit ec8d449

Browse files
committed
add : spinner, interest study type
1 parent 8f6351b commit ec8d449

File tree

2 files changed

+123
-40
lines changed

2 files changed

+123
-40
lines changed

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:join/page/signin/jobPage.dart';
1111
import 'package:join/page/joinMainPage.dart';
1212
import 'package:join/page/loginPage.dart';
1313
import 'package:join/page/mainPage.dart';
14-
import 'package:join/page/tab_study/createStudyPafe.dart';
14+
import 'package:join/page/tab_study/createStudyPage.dart';
1515

1616
import 'const/strings.dart';
1717
import 'page/signUpEmailPage.dart';

lib/page/tab_study/createStudyPafe.dart renamed to lib/page/tab_study/createStudyPage.dart

Lines changed: 122 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,22 @@ class CreateStudy extends StatefulWidget {
1717
class _CreateStudy extends State<CreateStudy> {
1818
bool value = false;
1919
int secretGroup = 1;
20-
int categoryGroup = 2;
20+
int categoryGroup = 1;
2121
String _dateTime = "DD/MM/YYYY";
2222
Dio dio = createDio();
2323
var firstAddressList = [];
2424
var secondAddressList = [];
25-
2625
String firstAddress = "도";
27-
String secondAddress = "시";
2826

27+
String secondAddress = "시";
2928
int recruitCount = 0;
3029

30+
String _interestStudyType = "스터디 상세 카테고리를 선택해주세요";
31+
var devStudy = ["웹 개발","서버 개발","모바일 개발","데이터사이언스","게임 개발","IoT 개발"];
32+
var designStudy = ["BX 디자인","UX/UI 디자인","영상 디자인","3D 디자인","일러스트레이터"];
33+
var planningStudy = ["GA 기획","UX 기획","역 기획","3D 디자인","마케팅 기획"];
34+
35+
3136
@override
3237
void initState() {
3338
super.initState();
@@ -73,7 +78,13 @@ class _CreateStudy extends State<CreateStudy> {
7378
studyArea(context),
7479
SizedBox(height: 28),
7580
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)
7788
],
7889
),
7990
),
@@ -85,6 +96,76 @@ class _CreateStudy extends State<CreateStudy> {
8596
);
8697
}
8798

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+
88169
Widget studyCategory() {
89170
return Theme(
90171
data: ThemeData.dark(),
@@ -184,50 +265,50 @@ class _CreateStudy extends State<CreateStudy> {
184265
children: <Widget>[
185266
Expanded(
186267
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,
201282
style: TextStyle(
202283
fontSize: 13,
203284
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+
),
207288
),
208289
),
209290
),
210291
),
211292
SizedBox(width: 13),
212293
Expanded(
213294
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))),
231312
child: Padding(
232313
padding: const EdgeInsets.only(
233314
left: 12, right: 12, top: 10, bottom: 10),
@@ -517,6 +598,7 @@ class _CreateStudy extends State<CreateStudy> {
517598
primaryColor: Color.fromRGBO(47, 55, 51, 1),
518599
hintColor: Colors.yellow),
519600
child: TextFormField(
601+
style: TextStyle(fontSize: 13,color: Colors.white),
520602
textAlignVertical: TextAlignVertical.center,
521603
decoration: InputDecoration(
522604
isDense: true,
@@ -551,7 +633,7 @@ class _CreateStudy extends State<CreateStudy> {
551633
),
552634
SizedBox(width: 4),
553635
Text(
554-
"(0/20)",
636+
"(0/200)",
555637
style: TextStyle(
556638
color: Color.fromRGBO(177, 177, 177, 1), fontSize: 13),
557639
),
@@ -569,6 +651,7 @@ class _CreateStudy extends State<CreateStudy> {
569651
primaryColor: Color.fromRGBO(47, 55, 51, 1),
570652
hintColor: Colors.yellow),
571653
child: TextField(
654+
style: TextStyle(fontSize: 13,color: Colors.white),
572655
expands: true,
573656
maxLines: null,
574657
maxLength: 200,

0 commit comments

Comments
 (0)