Skip to content

Commit

Permalink
feat. calender_info_screen #25
Browse files Browse the repository at this point in the history
- Edit CalendarInfoScreen Design
  • Loading branch information
JoGeumJu committed Jun 4, 2023
1 parent cacbab0 commit ae85450
Show file tree
Hide file tree
Showing 10 changed files with 459 additions and 203 deletions.
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:kakao_flutter_sdk_user/kakao_flutter_sdk_user.dart';
import 'package:flutter/services.dart';
import 'package:meonghae_front/screens/register_user_screen.dart';
import 'package:meonghae_front/screens/calendar_screen.dart';

void main() async {
// 카카오 앱의 클라이언트 ID를 설정
Expand All @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
return const MaterialApp(
locale: Locale('ko', 'KR'),
title: 'Meonghae?',
home: RegisterUserScreen(hasAnimal: true),
home: CalendarScreen(),
);
}
}
2 changes: 1 addition & 1 deletion lib/screens/calendar_info_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class _CalendarInfoScreenState extends State<CalendarInfoScreen> {
),
AdditionalInfoWidget(),
SizedBox(
height: 120,
height: 60,
)
],
),
Expand Down
154 changes: 72 additions & 82 deletions lib/widgets/calendar_info_screen/additional_info_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:meonghae_front/themes/customColor.dart';
import 'package:meonghae_front/widgets/calendar_info_screen/swich_widget.dart';
import 'package:meonghae_front/widgets/common/select_input_widget.dart';

class AdditionalInfoWidget extends StatefulWidget {
const AdditionalInfoWidget({super.key});
Expand All @@ -10,13 +12,14 @@ class AdditionalInfoWidget extends StatefulWidget {
}

class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
List<String> repeatList = ['안함', '1번', '2번'];
String selectedRepeatList = '안함';
bool isAllday = false;
List<String> repeatList = ['안 함', '함'];
String selectedRepeatList = '안 함';

List<String> informList = ['안함', '1번', '2번'];
String selectedInformList = '안함';
List<String> informList = ['안 함', ''];
String selectedInformList = '안 함';

bool _isAlways = false;
final bool _isAlways = false;
DateTime? _selectedStartDate;
DateTime? _selectedFinishDate;

Expand Down Expand Up @@ -86,6 +89,7 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
decoration: BoxDecoration(
Expand All @@ -95,6 +99,7 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
child: Column(
children: [
Container(
height: 45,
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
Expand All @@ -104,8 +109,8 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
),
),
child: Padding(
padding: const EdgeInsets.only(
left: 19,
padding: const EdgeInsets.symmetric(
horizontal: 20,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
Expand All @@ -119,17 +124,14 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
color: CustomColor.black1,
),
),
Transform.scale(
scale: 0.7,
child: Switch(
value: _isAlways,
onChanged: (bool newValue) {
setState(() {
_isAlways = newValue;
});
},
),
),
SwitchWidget(
clickSwitch: () {
setState(() {
isAllday = !isAllday;
});
},
isChecked: isAllday,
)
],
),
),
Expand All @@ -145,7 +147,7 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
),
child: Padding(
padding: const EdgeInsets.only(
left: 19,
left: 20,
right: 9,
),
child: Row(
Expand Down Expand Up @@ -196,7 +198,7 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
),
Padding(
padding: const EdgeInsets.only(
left: 19,
left: 20,
right: 9,
),
child: Row(
Expand Down Expand Up @@ -250,88 +252,76 @@ class _AdditionalInfoWidgetState extends State<AdditionalInfoWidget> {
const SizedBox(
height: 24,
),
Container(
decoration: BoxDecoration(
color: CustomColor.white,
borderRadius: BorderRadius.circular(10),
),
child: Padding(
padding: const EdgeInsets.only(
left: 19,
SizedBox(
height: 45,
child: Stack(children: [
SelectInputWidget(
width: MediaQuery.of(context).size.width * 0.88,
height: 45,
itemHeight: 45,
list: repeatList,
listHeight: 90,
borderRadius: 10,
fontSize: 13,
defaultValue: selectedRepeatList,
setValue: (String value) =>
setState(() => selectedRepeatList = value),
isBigIcon: true,
textAlign: TextAlign.right,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
const Positioned(
top: 0,
bottom: 0,
left: 20,
child: Center(
child: Text(
'반복',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
color: CustomColor.black1,
),
),
DropdownButton(
value: selectedRepeatList,
items: repeatList.map((String item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
underline: Container(),
onChanged: (dynamic value) {
setState(() {
selectedRepeatList = value;
});
},
),
],
),
),
),
)
]),
),
const SizedBox(
height: 24,
),
Container(
decoration: BoxDecoration(
color: CustomColor.white,
borderRadius: BorderRadius.circular(10),
),
child: Padding(
padding: const EdgeInsets.only(
left: 19,
SizedBox(
height: 45,
child: Stack(children: [
SelectInputWidget(
width: MediaQuery.of(context).size.width * 0.88,
height: 45,
itemHeight: 45,
list: informList,
listHeight: 90,
borderRadius: 10,
fontSize: 13,
defaultValue: selectedInformList,
setValue: (String value) =>
setState(() => selectedInformList = value),
isBigIcon: true,
textAlign: TextAlign.right,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
const Positioned(
top: 0,
bottom: 0,
left: 20,
child: Center(
child: Text(
'알림',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
color: CustomColor.black1,
),
),
DropdownButton(
value: selectedInformList,
items: informList.map((String item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
underline: Container(),
onChanged: (dynamic value) {
setState(() {
selectedInformList = value;
});
},
),
],
),
),
),
)
]),
),
const SizedBox(
height: 24,
Expand Down
Loading

0 comments on commit ae85450

Please sign in to comment.