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

scrollToBottom #4

Closed
edianogama opened this issue Sep 27, 2019 · 4 comments
Closed

scrollToBottom #4

edianogama opened this issue Sep 27, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@edianogama
Copy link

edianogama commented Sep 27, 2019

Describe the bug
Hello again Fayeed.
I really liked the UI, so I don't want to abandon it. But I have a problem.

How can I disable scrollToBottom ?

 return DashChat(
                  key: _chatViewKey,
                  user: user,
                  scrollToBottom: false,

When set scrollToBottom to false, nothing happens, the button keeps appearing;

Why am i wanting this?
Because when sending messages, sometimes a bug happens and it can't go to the bottom of the automated scroll.
And The distance it disappears from the footer is too short and I couldn't adjust this part.

When the keyboard is open and I send a message, the scroll does not reach the end.

If there is any way to get the down button only halfway up the screen, it would be ideal for me.

Thank you for your attention.

@Vidar88
Copy link

Vidar88 commented Oct 1, 2019

The scrollToBottom widget always appears because it isn't checked whether to show that thing in this line:

if (this._overlayEntry == null) {

It is always created and stays on top of everything even if you leave the chat screen in my app.

I created my own instance of the chat view and fixed it by adding:

if (this._overlayEntry == null && widget.scrollToBottom) {

This is working for me, as I needed to change a few other things in my app (like stopping the chat input to disappear out of viewport when inside a tabbarview). Maybe the author could provide a fix for that in a next release :)

@fayeed fayeed added the bug Something isn't working label Oct 4, 2019
@fayeed
Copy link
Owner

fayeed commented Oct 4, 2019

@edianogama Just updated the package to version 1.0.5, it includes the solution @Vidar88 mentioned and also includes some more fixes to the UI and performance improvements. And also added a better example in the example/ folder.

@edianogama
Copy link
Author

@Vidar88 Hi, thank you very much for your response to the topic and for passing the solution.
And Thanks to the @fayeed for placing the adjustment. I upgraded here and it worked!
clapping!!

@StuartMesham
Copy link

I am using package version 1.0.15 and it seems the problem is back. The scrollToBottom widget stays on top of everything even when I leave the chat screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants