In Chatting Application I am using StreamBuilder and in stream I am using it. Where layout show sender and reciever messages.
.where
'(RecieverId == $RecieverId && SenderId == ${_auth.currentUser!.uid}) || (RecieverId == ${_auth.currentUser!.uid} && SenderId == $RecieverId)'
)