getNicknameOrYou method

String getNicknameOrYou(
  1. User? user,
  2. SBUStrings strings
)
inherited

Implementation

String getNicknameOrYou(User? user, SBUStrings strings) {
  String result = '';
  if (user != null) {
    if (user.userId.isNotEmpty &&
        user.userId == SendbirdChat.currentUser?.userId) {
      return strings.you;
    }

    if (user.nickname.isNotEmpty) {
      result = user.nickname;
    }
  }
  return result;
}