flutter_chat_ui
flutter_chat_ui copied to clipboard
How to add a widget at the top that scrolls with messages?
Hello 👋
My use case: I want the Chat() widget to appropriately scroll with another widget on the screen. Eg., I am adding a widget to the top of all the chat messages, and I want to scroll past it like another message! I suspect this not current possible but I would love some guidance.
I think it is not possible because Chat() is not using the parent's scrollController correctly, even when this is passed it. Chat(...) always scrolls independently of the outer scaffold. Is this a known issue? Any thoughts how to address or accomplish my use case?
Okay, I found a nice solution. I am adding locally a "pinned Widget" that will render a widget at the very top of the messages. Happy to create a PR for this if it will be helpful
hey @kornha currently working on a v2 re-design of the package and I will make sure to include options to have widgets scrollable with messages on both top and bottom of the list. Thanks!
This is a use case I'm also concerned with. Do we have any solution for it?
figuring out last bits of architecture for v2, still in progress. I don't think there is a solution in v1 :/
确定 v2 架构的最后部分,仍在进行中。我认为 v1 中没有解决方案:/
When will v2 be released?
No timelines, I was going pretty fast with it for the last month or so, but now my parents came from my occupied home town after 5 years and I am helping them to build a new life in a new country, so had no chance to work on v2 recently. I am planning to do most of the work at the end of December and see how things will look for January 2024.
I am planning to do most of the work at the end of December and see how things will look for January 2024.
Looking forward to the v2, @demchenkoalex !
Yeah me as well :) continuing work now
Kindly inform once Version 2 is finalized so that I can address this issue accordingly. Thanks.
@prachishukla007 no update unfortunately, lots of work at the beginning of the year at my company. If your business depends on this issue, I would fork or look for alternatives as of right now. Will update as soon as there is progress (still 1 major architecture issue, then beta, then release)
I tried to find any alternative of it but it doesn't seem like there is any solution of it right now. Yes, please update as soon as possible.
If the new version isn't coming any time soon. I can fork this version and make a modification of this version. I think in textMessageBuilder() in message.dart. I can just create the textmessage like normal and then pass it to the builder. The builder can then decide to display the default text message with new widgets. Or make a whole new one.
What do you think?
Edit: Or I can add it to where the bubble is created. So include the default bubble potentially with whatever extra stuff is wanted.