-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
302 additions
and
48 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
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
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
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
36 changes: 36 additions & 0 deletions
36
lib/presentation/screens/chatting/view/components/custom_quest_button.dart
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,36 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomQuestButton extends StatelessWidget { | ||
final String label; | ||
final VoidCallback onPressed; | ||
|
||
const CustomQuestButton({ | ||
super.key, | ||
required this.label, | ||
required this.onPressed, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return InkWell( | ||
onTap: onPressed, | ||
borderRadius: BorderRadius.circular(8.0), // 클릭 효과를 위한 모서리 둥글기 | ||
child: Container( | ||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), // 버튼 크기 | ||
decoration: BoxDecoration( | ||
color: Colors.white, // 배경색 | ||
border: Border.all(color: Colors.grey), // 회색 보더 | ||
borderRadius: BorderRadius.circular(8.0), // 둥근 모서리 | ||
), | ||
child: Text( | ||
label, | ||
style: const TextStyle( | ||
fontSize: 8, // 텍스트 크기 | ||
color: Colors.grey, // 텍스트 색상 | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
lib/presentation/screens/chatting/view/components/quest_box.dart
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,66 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:palink_v2/core/theme/app_colors.dart'; | ||
|
||
class QuestBox extends StatelessWidget { | ||
final String questText; | ||
|
||
QuestBox({super.key, required this.questText}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
margin: const EdgeInsets.only(top: 10.0, bottom: 10.0, left: 0.0, right: 8.0), | ||
padding: const EdgeInsets.all(8.0), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(6.0), // 모서리를 약간 둥글게 변경 | ||
color: Colors.white, // 배경색을 흰색으로 변경 | ||
border: Border.all( | ||
color: Colors.grey, // 파란색 얇은 보더 추가 | ||
width: 0.8, | ||
), | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.black.withOpacity(0.1), | ||
blurRadius: 2.0, | ||
offset: const Offset(0, 1), | ||
), | ||
], | ||
), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, // 텍스트를 왼쪽 정렬 | ||
children: [ | ||
// '현재 퀘스트' 제목 | ||
const Text( | ||
'현재 퀘스트', | ||
style: TextStyle( | ||
color: Colors.blueAccent, | ||
fontSize: 12, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
const SizedBox(height: 6.0), // 제목과 내용 사이에 간격 추가 | ||
// 퀘스트 내용 | ||
Row( | ||
crossAxisAlignment: CrossAxisAlignment.center, // 아이콘과 텍스트를 가운데 정렬 | ||
children: [ | ||
// const Icon(Icons.keyboard_arrow_right, color: Colors.blueAccent, size: 20), // 체크 아이콘 추가 | ||
// const SizedBox(width: 8.0), // 아이콘과 텍스트 사이의 간격 | ||
Flexible( // 텍스트를 유연하게 줄바꿈할 수 있도록 함 | ||
child: Text( | ||
questText, | ||
style: const TextStyle( | ||
color: Colors.black87, | ||
fontSize: 12, | ||
fontWeight: FontWeight.normal, | ||
), | ||
maxLines: 2, // 최대 두 줄까지 표시 | ||
overflow: TextOverflow.ellipsis, // 텍스트가 길 경우 말줄임표 처리 | ||
), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.