chat_app_live_stream icon indicating copy to clipboard operation
chat_app_live_stream copied to clipboard

Enhancement : scroll down not only when you press the send button but also you have been received new data from firebase

Open KimKiHyuk opened this issue 6 years ago • 0 comments

thank you for sharing your chat app code. i've got enhancememt point of your chat app.

Problem

  • other people sent message to you. flutter_chat_1

  • but scroller doesn't go down to bottom automatically. so you can't notice new message flutter_chat_2

Solution

when the send button clicked, scroll controller is heading down because of https://github.com/tensor-programming/chat_app_live_stream/blob/9631e44adbfa46c46bdc727a131d7456e759dbfa/lib/main.dart#L288-L291

but while other people are saying, scroller doesn't go down. because scroll down logic is only fired when send button clicked. In order to fix this problem, i suggest addPostFrameCallback of SchedulerBinding

KimKiHyuk avatar Oct 14 '19 08:10 KimKiHyuk