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 widget remains visible after leaving chat page #30

Closed
StuartMesham opened this issue Mar 1, 2020 · 7 comments · Fixed by #82
Closed

scrollToBottom widget remains visible after leaving chat page #30

StuartMesham opened this issue Mar 1, 2020 · 7 comments · Fixed by #82
Labels
bug Something isn't working

Comments

@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.

This is the same problem that was brought up in issue: #4

I am using:

dash_chat: ^1.0.15

Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (3 months ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0

From the .metadata file:

version:
revision: 27321ebbad34b0a3fafe99fac037102196d655ff
channel: stable

project_type: app

@fayeed
Copy link
Owner

fayeed commented Mar 2, 2020

@StuartMesham I don't know, I will check and let you know.

@MaIronCool
Copy link

Hi. I have a same problem. Package version 1.0.18.
appBar: CupertinoNavigationBar() - when i leaving chat page scrollToBottom widget remains visible.

@brandonwatkins
Copy link

I am also experiencing the same problem for me using:

dash_chat: ^1.0.18

If the scroll to bottom button is visible and you click the back button in the app bar to pop the screen the button is visible on all screens.

@fayeed fayeed added the bug Something isn't working label Apr 20, 2020
@SebastienBtr
Copy link
Collaborator

I might take a look at this issue later, it's maybe easy to solve.

To answer to @rlee1990 in #6 :

As a workaround you can use a floating button and add a listener on the scroll controller to show or hide this floating button. And of course when you click on this button you use the scroll controller to scroll down:

final scrollController = _chatViewKey.currentState.scrollController;

// When you click on the button:
scrollController.animateTo(
  scrollController.position.maxScrollExtent,
  curve: Curves.easeOut,
  duration: Duration(milliseconds: 300),
);

// The scroll container listener:
scrollController.addListener(() {
      if (scrollController.offset >= YOUR DESIRED VALUE) {
        // show the floating btn
      } else if (topReached) {
        // hide the floating btn
      }
  });
}

I didn't test this code, that's just an idea, hopefully this can help you :)

@albrownwood
Copy link

albrownwood commented Jun 8, 2020

same issue seen on 1.1.5

@fayeed fayeed closed this as completed in #82 Jun 8, 2020
@fayeed
Copy link
Owner

fayeed commented Jun 8, 2020

@albrownwood This has been fixed by the PR from @SebastienBtr, I will release the new version shortly.

@fayeed
Copy link
Owner

fayeed commented Jun 8, 2020

Updated the package to 1.1.7

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

Successfully merging a pull request may close this issue.

6 participants