getUserFromId method

ChatUser getUserFromId(
  1. String userId
)

Function for getting ChatUser object from user id

Implementation

ChatUser getUserFromId(String userId) => userId == currentUser.id
    ? currentUser
    : otherUsers.firstWhere((element) => element.id == userId);