-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: home, friend screen + Mission Dialog UI
- Loading branch information
Showing
32 changed files
with
1,573 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:dagather_frontend/utilities/colors.dart'; | ||
import 'package:dagather_frontend/utilities/fonts.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
|
||
class ActionDialog extends StatelessWidget { | ||
final String content; | ||
final String buttonText; | ||
final Color buttonColor; | ||
final void Function() onPressed; | ||
|
||
const ActionDialog( | ||
{super.key, | ||
required this.content, | ||
required this.buttonText, | ||
required this.buttonColor, | ||
required this.onPressed}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return AlertDialog( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.all(Radius.circular(10.r)), | ||
), | ||
insetPadding: EdgeInsets.symmetric(horizontal: 50.w), | ||
contentPadding: | ||
EdgeInsets.only(right: 20.w, left: 20.w, top: 44.h, bottom: 36.h), | ||
content: Text(content), | ||
contentTextStyle: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 15.sp, | ||
height: 1.55, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: AppColor.g900, | ||
), | ||
actionsPadding: EdgeInsets.only(right: 12.w, left: 12.w, bottom: 12.h), | ||
actions: [ | ||
Row( | ||
children: [ | ||
Flexible( | ||
flex: 1, | ||
fit: FlexFit.tight, | ||
child: TextButton( | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
style: TextButton.styleFrom( | ||
backgroundColor: AppColor.g200, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8).r, | ||
), | ||
padding: EdgeInsets.symmetric( | ||
vertical: 14.h, | ||
), | ||
), | ||
child: Text( | ||
"취소", | ||
style: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 13.sp, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: AppColor.g700, | ||
), | ||
), | ||
), | ||
), | ||
SizedBox( | ||
width: 8.w, | ||
), | ||
Flexible( | ||
flex: 2, | ||
fit: FlexFit.tight, | ||
child: TextButton( | ||
onPressed: onPressed, | ||
style: TextButton.styleFrom( | ||
backgroundColor: buttonColor, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8).r, | ||
), | ||
padding: EdgeInsets.symmetric(vertical: 14.h), | ||
), | ||
child: Text( | ||
buttonText, | ||
style: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 13.sp, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: AppColor.g900, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:dagather_frontend/utilities/colors.dart'; | ||
import 'package:dagather_frontend/utilities/fonts.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
|
||
class BaseDialog extends StatelessWidget { | ||
final String content; | ||
final String buttonText; | ||
final void Function() onPressed; | ||
|
||
const BaseDialog( | ||
{super.key, | ||
required this.content, | ||
required this.buttonText, | ||
required this.onPressed}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return AlertDialog( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.all(Radius.circular(10.r)), | ||
), | ||
insetPadding: EdgeInsets.symmetric(horizontal: 50.w), | ||
contentPadding: | ||
EdgeInsets.only(right: 20.w, left: 20.w, top: 44.h, bottom: 36.h), | ||
content: Text( | ||
content, | ||
textAlign: TextAlign.center, | ||
), | ||
contentTextStyle: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 15.sp, | ||
height: 1.55, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: AppColor.g900, | ||
), | ||
actionsPadding: EdgeInsets.only(right: 12.w, left: 12.w, bottom: 12.h), | ||
actions: [ | ||
Row( | ||
children: [ | ||
Expanded( | ||
child: TextButton( | ||
onPressed: onPressed, | ||
style: TextButton.styleFrom( | ||
backgroundColor: AppColor.g200, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8).r, | ||
), | ||
padding: EdgeInsets.symmetric( | ||
vertical: 14.h, | ||
), | ||
), | ||
child: Text( | ||
buttonText, | ||
style: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 13.sp, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: AppColor.g700, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:dagather_frontend/utilities/fonts.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
|
||
class BaseMidiumButton extends StatelessWidget { | ||
final Color textColor; | ||
final Color backgroundColor; | ||
final String text; | ||
final void Function() onPressed; | ||
|
||
const BaseMidiumButton( | ||
{super.key, | ||
required this.textColor, | ||
required this.backgroundColor, | ||
required this.text, | ||
required this.onPressed}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return TextButton( | ||
onPressed: onPressed, | ||
style: TextButton.styleFrom( | ||
backgroundColor: backgroundColor, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8).r, | ||
), | ||
padding: EdgeInsets.symmetric(vertical: 14.h, horizontal: 16.w), | ||
), | ||
child: Text( | ||
text, | ||
style: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 14.sp, | ||
fontVariations: const [ | ||
FontVariation('wght', 700), | ||
], | ||
color: textColor, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:dagather_frontend/utilities/colors.dart'; | ||
import 'package:dagather_frontend/utilities/fonts.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
|
||
class InformationDialog extends StatelessWidget { | ||
final String title; | ||
final String content; | ||
|
||
const InformationDialog({ | ||
super.key, | ||
required this.title, | ||
required this.content, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return AlertDialog( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.all(Radius.circular(10.r)), | ||
), | ||
insetPadding: EdgeInsets.symmetric(horizontal: 50.w), | ||
title: Text(title), | ||
titleTextStyle: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 15.sp, | ||
height: 1.55, | ||
fontVariations: const [ | ||
FontVariation('wght', 800), | ||
], | ||
color: AppColor.g800, | ||
), | ||
titlePadding: EdgeInsets.only(right: 28.w, left: 28.w, top: 28.h), | ||
contentPadding: | ||
EdgeInsets.only(right: 28.w, left: 28.w, top: 4.h, bottom: 28.h), | ||
content: Text( | ||
content, | ||
), | ||
contentTextStyle: TextStyle( | ||
fontFamily: pretendardFont, | ||
fontSize: 15.sp, | ||
height: 1.55, | ||
fontVariations: const [ | ||
FontVariation('wght', 500), | ||
], | ||
color: AppColor.g700, | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.