Skip to content

Commit

Permalink
#132 feat: 채팅방 상세화면 bottom sheet 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Nya128 committed Dec 23, 2023
1 parent 18dfa54 commit 1d59552
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
68 changes: 67 additions & 1 deletion lib/chat/view/chat_room_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ChatRoomScreen extends StatefulWidget {
class _ChatRoomScreenState extends State<ChatRoomScreen> {
final TextStyle nicknameTextStyle = const TextStyle(
fontSize: 15.0, fontWeight: FontWeight.w500, color: GRAY_4_COLOR);
final TextStyle reportTextStyle = const TextStyle(
fontSize: 15.0, fontWeight: FontWeight.w500, color: GRAY_4_COLOR);
final TextStyle leaveTextStyle = const TextStyle(
fontSize: 15.0, fontWeight: FontWeight.w500, color: RED_COLOR);

Future<dynamic> fetchData() async {
return await ChatService().getChat();
Expand Down Expand Up @@ -84,7 +88,61 @@ class _ChatRoomScreenState extends State<ChatRoomScreen> {
IconButton(
icon: SvgPicture.asset('asset/icons/shopping/more_vertical.svg'),
onPressed: () {
// TODO: 신고하기/나가기 메뉴
showModalBottomSheet(
backgroundColor: Colors.white,
barrierColor: BLACK_COLOR_70,
context: context,
builder: (context) {
return Container(
color: Colors.white,
child: SafeArea(
top: false,
child: Container(
color: Colors.white,
height: 133,
child: ListView(
children: [
GestureDetector(
onTap: () {
/// 신고하면 자동으로 채팅방 나가지나? 상대방 차단되나? 아님 신고해도 그대로?
showReportDialog();
},
child: SizedBox(
height: 66,
child: Center(
child: Text(
"신고하기",
style: reportTextStyle,
),
)
),
),
const Divider(
height: 1,
color: GRAY_0_COLOR,
),
GestureDetector(
onTap: () {
/// pop해서 기존 채팅방 화면에 나간다는 정보를 전달해야 되나?
showConfirmationDialog();
},
child:SizedBox(
height: 66,
child: Center(
child: Text(
"나가기",
style: leaveTextStyle,
),
),
),
)
],
),
),
),
);
},
);
},
),
],
Expand All @@ -105,4 +163,12 @@ class _ChatRoomScreenState extends State<ChatRoomScreen> {
),
);
}

void showReportDialog() {

}

void showConfirmationDialog() {

}
}
2 changes: 1 addition & 1 deletion lib/chat/view/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class _ChatScreenState extends State<ChatScreen> {
fontSize: 16.0, fontWeight: FontWeight.w700, color: Colors.black);

// late List<ChatModel?> chatList;
// 더미데이터(사진/닉네임/마지막 채팅/날짜/안 읽은 채팅 수)
/// 더미데이터(사진/닉네임/마지막 채팅/날짜/안 읽은 채팅 수)
List<dynamic> chatList = [
[null, "슈크림붕어빵", "안녕하시와요", "오후 10:11", 1],
[null, "뽀로로", "아아 알겠습니다!", "3시간 전", 0],
Expand Down
2 changes: 2 additions & 0 deletions lib/common/const/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ const PURPLE_COLOR_50 = Color(0x809A7CB6);
const PURPLE_COLOR_10 = Color(0x1A9A7CB6);
const ERROR_COLOR = Color(0xFFFF6B85);
const ORANGE_COLOR = Color(0xFFFFA53F);
const BLACK_COLOR_70 = Color(0xB3000000);
const RED_COLOR = Color(0xFFF05F5F);

0 comments on commit 1d59552

Please sign in to comment.