BugFix: Key does not exist

master
Rafael 2024-06-21 02:15:24 +02:00
parent 87beb2dace
commit 78b9f1bc7b
1 changed files with 8 additions and 1 deletions

View File

@ -338,6 +338,13 @@ class LikedUsersPageState extends State<LikedUsersPage> {
}
},
onShowChat: () {
Map<String, dynamic> userMap =
user.data() as Map<String, dynamic>;
String? profilePic =
userMap.containsKey(Constants.dbFieldUsersProfilePic)
? user[Constants.dbFieldUsersProfilePic]
: null;
Navigator.push(
context,
MaterialPageRoute(
@ -345,7 +352,7 @@ class LikedUsersPageState extends State<LikedUsersPage> {
receiverEmail: user[Constants.dbFieldUsersEmail],
receiverID: user[Constants.dbFieldUsersID],
chatTitle: user[Constants.dbFieldUsersName],
profileImageUrl: user[Constants.dbFieldUsersProfilePic],
profileImageUrl: profilePic,
),
),
);