Coder Social home page Coder Social logo

Comments (15)

sijangurung avatar sijangurung commented on June 24, 2024 4

one solution to this is to set inverse: true. But then you have to get the messages in ascending order and do some custom logic.

from dash_chat.

nguyenvanzk avatar nguyenvanzk commented on June 24, 2024 2

This happen when the list view content's height exceed visible rect.

from dash_chat.

mustafapc19 avatar mustafapc19 commented on June 24, 2024 2

I am also facing @SubashManian 's issue. Is there any hacky way to fix it?? And is there any documentation for how internals of this package works. I could help out maybe.

from dash_chat.

hjJunior avatar hjJunior commented on June 24, 2024 1

You can use the method animateTo from scrollController, here is the example

final scrollController = _chatViewKey.currentState.scrollController;

scrollController.animateTo(
  scrollController.position.maxScrollExtent,
  curve: Curves.easeOut,
  duration: Duration(milliseconds: 300),
);

Don't forget to define the GlobalKey (_chatViewKey)

final _chatViewKey = GlobalKey<DashChatState>();

// ... and on build method
return DashChat(
  key: _chatViewKey,
);

from dash_chat.

SubashManian avatar SubashManian commented on June 24, 2024 1

Scroll Issue

i'm facing the same scroll issue in different scenario, whenever i try to open the dashchat or send a new message it stops before 1 or 2 recent messages, it's not fully scroll to bottom. This issue is happening for the scroll to bottom default button too. i'm using below line of codes to scroll.

_chatViewKey.currentState.scrollController.animateTo( _chatViewKey.currentState.scrollController.position.maxScrollExtent, curve: Curves.easeOut, duration: const Duration(milliseconds: 100), );

Thanks in advance

from dash_chat.

athlona64 avatar athlona64 commented on June 24, 2024

how to solve

from dash_chat.

ngoctranfire avatar ngoctranfire commented on June 24, 2024

This doesn't actually solve the problem as well too. Not sure what's going on. It seems that with the visibility of the virtual keyboard, the new message is not going to it by default. One thing I tried was to increase my delay time before triggering the scrolling duration. That seems to be helpful in a lot more cases, but that didn't exactly fix it either.

from dash_chat.

sijangurung avatar sijangurung commented on June 24, 2024

Also, if there are lots of images, which will render lazily, the messageListView will not scroll to latest message.

from dash_chat.

albrownwood avatar albrownwood commented on June 24, 2024

same issue on 1.1.5

from dash_chat.

0xmikko avatar 0xmikko commented on June 24, 2024

Any news?

from dash_chat.

vzctl avatar vzctl commented on June 24, 2024

I think it makes sense to add a parameter to the DashChat constuctor enabling that behavior, it looks like a very common use case.

from dash_chat.

fluttercid avatar fluttercid commented on June 24, 2024

Hi all,
I stored messages and when I reopen chat window, it is stay on the top so I used scroll control.
Even though, it is not working properly. I mean last message behind on input bar.
Is there any solutions for this?
Thanks

from dash_chat.

SebastienBtr avatar SebastienBtr commented on June 24, 2024

Hi @fluttercid, in that case you maybe have a margin issue, you can use inputToolbarMargin for that

from dash_chat.

fluttercid avatar fluttercid commented on June 24, 2024

Thank you for your answer @SebastienBtr
I tried your suggestion; however, it is not working.
I think messageviewlist height is include input box.
I made a document for it.
explain about situation.docx

from dash_chat.

ritheshSalyan avatar ritheshSalyan commented on June 24, 2024

One workaround is to use a small delay after sending message and then scroll

     await  Future.delayed(Duration(milliseconds: 500));
    _chatViewKey.currentState.scrollController.animateTo(
      _chatViewKey.currentState.scrollController.position.maxScrollExtent,
      curve: Curves.easeOut,
      duration: const Duration(milliseconds: 100),
    );

from dash_chat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.