containsMentionedUser method Null safety
- User? user
Implementation
bool containsMentionedUser(User? user) {
if (user == null || mentionedUsers.isEmpty) {
return false;
}
return mentionedUsers
.where((element) => element.userId == user.userId)
.toList()
.isNotEmpty;
}