getUserFromId method

ChatUser getUserFromId(
  1. String userId
)

Function for getting ChatUser object from user id

Implementation

ChatUser getUserFromId(String userId) =>
    chatUsers.firstWhere((element) => element.id == userId);