-
Notifications
You must be signed in to change notification settings - Fork 0
245 모달 컴포넌트 제작 #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "245-\uBAA8\uB2EC-\uCEF4\uD3EC\uB10C\uD2B8-\uC81C\uC791"
Merged
245 모달 컴포넌트 제작 #251
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9227d0f
chore: change name from schedule start into schedule start screen
SeoHyeonSim a3b19d0
feat: create modal component and apply in schedule start screen
SeoHyeonSim 19f9fa5
feat: add usecase for modal component
SeoHyeonSim 0494fff
fix: get image asset from assets characters folder
SeoHyeonSim 38e3522
refactor: modify modal component for alterdialog
SeoHyeonSim 45a5060
chore: add character variable svg files
SeoHyeonSim 5cc86c3
chore: fix minor error
SeoHyeonSim c6e3857
refactor: change modal component according to alert dialog style
SeoHyeonSim 047ffb2
refactor: add modal button component and change image names
SeoHyeonSim 2a54378
chore: remove unnecessary blank lines in launch configuration
jjoonleo aeef3cb
refactor: enhance dialog theme with custom styles and remove unused t…
jjoonleo 7bbdaa9
feat: implement CustomAlertDialog component and remove ModalComponent
jjoonleo 04029c3
refactor: remove unnecessary padding from background container in Wid…
jjoonleo cce037c
refactor: replace ModalComponent with CustomAlertDialog in ScheduleSt…
jjoonleo d9818ec
feat: add CustomAlertDialog component and remove ModalComponent
jjoonleo 98e0b77
Merge pull request #256 from DevKor-github/245-모달-컴포넌트-제작-refactor
SeoHyeonSim 1a80e05
refactor: delete unnecessary imports and texts in custom alert dialog
SeoHyeonSim 5eec840
refactor: fix custom alert dialog according to design
SeoHyeonSim 2317b4e
feat: add modal error button
SeoHyeonSim cf4144a
refactor: change widgetbook usecase according to design
SeoHyeonSim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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,12 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class MovingScreen extends StatelessWidget { | ||
const MovingScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
child: Text('this is moving screen'), | ||
); | ||
} | ||
} |
127 changes: 127 additions & 0 deletions
127
lib/presentation/shared/components/modal_component.dart
This file contains hidden or 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,127 @@ | ||
import 'dart:ui'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class ModalComponent extends StatelessWidget { | ||
final VoidCallback leftPressed; | ||
final VoidCallback rightPressed; | ||
final String modalTitleText; | ||
final String modalDetailText; | ||
final String leftButtonText; | ||
final String rightButtonText; | ||
final Color leftButtonColor; | ||
final Color leftButtonTextColor; | ||
final Color rightButtonColor; | ||
final Color rightButtonTextColor; | ||
|
||
const ModalComponent({ | ||
super.key, | ||
required this.leftPressed, | ||
required this.rightPressed, | ||
required this.modalTitleText, | ||
required this.modalDetailText, | ||
required this.leftButtonText, | ||
required this.rightButtonText, | ||
required this.leftButtonColor, | ||
required this.leftButtonTextColor, | ||
required this.rightButtonColor, | ||
required this.rightButtonTextColor, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return BackdropFilter( | ||
filter: ImageFilter.blur(sigmaX: 0, sigmaY: 0), | ||
child: AlertDialog( | ||
SeoHyeonSim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
backgroundColor: Colors.white, | ||
contentPadding: const EdgeInsets.all(20), | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(12), | ||
), | ||
content: SizedBox( | ||
width: 276, | ||
height: 145, | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
// Title & Description Section | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
modalTitleText, | ||
style: const TextStyle( | ||
fontSize: 20, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
const SizedBox(height: 10), | ||
Text( | ||
modalDetailText, | ||
style: const TextStyle( | ||
fontSize: 13, | ||
), | ||
), | ||
], | ||
), | ||
// Buttons Section | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: [ | ||
_Button( | ||
onPressed: leftPressed, | ||
text: leftButtonText, | ||
backgroundColor: leftButtonColor, | ||
textColor: leftButtonTextColor, | ||
), | ||
const SizedBox(width: 8), | ||
_Button( | ||
onPressed: rightPressed, | ||
text: rightButtonText, | ||
backgroundColor: rightButtonColor, | ||
textColor: rightButtonTextColor, | ||
), | ||
], | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _Button extends StatelessWidget { | ||
SeoHyeonSim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
final VoidCallback onPressed; | ||
final String text; | ||
final Color backgroundColor; | ||
final Color textColor; | ||
|
||
const _Button({ | ||
required this.onPressed, | ||
required this.text, | ||
required this.backgroundColor, | ||
required this.textColor, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
width: 114, | ||
height: 43, | ||
child: TextButton( | ||
style: TextButton.styleFrom( | ||
backgroundColor: backgroundColor, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(8), | ||
), | ||
), | ||
onPressed: onPressed, | ||
child: Text( | ||
text, | ||
style: TextStyle(color: textColor, fontSize: 18), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.