Skip to content

Commit

Permalink
#14 Feat: toat message 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinyshin committed Nov 27, 2023
1 parent 962b600 commit 2e3543f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions unibond/lib/view/screens/letter/letter_write_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:get/get.dart';

class LetterWriteScreen extends StatefulWidget {
Expand Down Expand Up @@ -36,7 +37,7 @@ class _LetterWriteScreenState extends State<LetterWriteScreen> {
icon: const Icon(Icons.send),
onPressed: () {
// 편지 전송하는 코드 추가
// showToast();
showToastMessage();
Get.back(); // 이전 화면 이동
},
)
Expand Down Expand Up @@ -72,13 +73,14 @@ class _LetterWriteScreenState extends State<LetterWriteScreen> {
}
}

// void showToast() {
// Fluttertoast.showToast(
// msg: "전송이 완료되었습니다",
// toastLength: Toast.LENGTH_SHORT,
// gravity: ToastGravity.BOTTOM,
// timeInSecForIosWeb: 1,
// backgroundColor: Colors.grey,
// textColor: Colors.white,
// fontSize: 16.0);
// }
void showToastMessage() {
Fluttertoast.showToast(
msg: "전송이 완료되었습니다",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 2,
backgroundColor: Colors.grey,
textColor: Colors.white,
fontSize: 16.0,
);
}

0 comments on commit 2e3543f

Please sign in to comment.