otherParticipant property
Participant?
get
otherParticipant
Other participant in direct chat (null for group).
Implementation
Participant? get otherParticipant {
if (!isDirect || participants.length < 2) return null;
return participants.firstWhere(
(p) => p.userId != myUserId,
orElse: () => participants.first,
);
}