Skip to content

Commit

Permalink
string buyer update
Browse files Browse the repository at this point in the history
버그수정
  • Loading branch information
MINSIX committed Dec 4, 2023
1 parent f91380f commit 7d8b7f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pages/chatroom/chatroom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ Widget build(BuildContext context) {
if (snapshot.connectionState == ConnectionState.done) {
DocumentSnapshot documentSnapshot = snapshot.data as DocumentSnapshot;

String buyer = documentSnapshot['buyer'] ?? null; // Get the 'buyer' field, default to empty string if null
String buyer = documentSnapshot['buyer'] ?? ""; // Get the 'buyer' field, default to empty string if null

return Visibility(
visible: currentUser.nickName == documentSnapshot['saler'],
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: ElevatedButton(
onPressed: isButtonClicked || buyer.isNotEmpty
onPressed: isButtonClicked || buyer!.isNotEmpty
? null // Disable the button if it's already clicked or buyer is not empty
: () async {
String saler = documentSnapshot['saler'];
Expand Down Expand Up @@ -306,4 +306,4 @@ Widget build(BuildContext context) {
curve: Curves.easeOut,
);
}
}
}

0 comments on commit 7d8b7f3

Please sign in to comment.