Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying the current user messages on the right hand side #8

Closed
PolymathWhiz opened this issue Nov 25, 2019 · 2 comments
Closed

Displaying the current user messages on the right hand side #8

PolymathWhiz opened this issue Nov 25, 2019 · 2 comments

Comments

@PolymathWhiz
Copy link

How can I display the message of the current user on the right-hand side of the screen? I see it on your demo but can't find a way to implement it.

@fayeed
Copy link
Owner

fayeed commented Nov 25, 2019

The ChatMessage objects user property should match with the DashChat user property:

There is your chat message:

ChatMessage(
        text: "Hello",
        user: ChatUser( //this should match
          name: "Fayeed",
          uid: "123456789",
          avatar: "https://www.wrappixel.com/ampleadmin/assets/images/users/4.jpg",
        ),
        createdAt: DateTime.now(),
        image: "http://www.sclance.com/images/picture/Picture_753248.jpg",
    );

with this:

DashChat(
  user: ChatUser(
    name: "Fayeed",
    uid: "123456789",
    avatar: "https://www.wrappixel.com/ampleadmin/assets/images/users/4.jpg",
  )
);

Most importantly the uid of ChatUser should be the same.

@PolymathWhiz
Copy link
Author

Awesome! my issue has been fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants