dash_chat icon indicating copy to clipboard operation
dash_chat copied to clipboard

Error when typing messages and pressing the back button

Open ngoc-quoc-huynh opened this issue 4 years ago • 1 comments

Describe the bug After typing some messages if I click on the chat or press the back button so that my keyboard disappears, I can't send messages anymore. This error only occurs if inverted is false.

The following assertion was thrown during performLayout():
Build scheduled during frame.

While the widget tree was being built, laid out, and painted, a new frame was scheduled to rebuild the widget tree.

This might be because setState() was called from a layout or paint callback. If a change is needed to the widget tree, it should be applied as the tree is being built. Scheduling a change for the subsequent frame instead results in an interface that lags behind by one frame. If this was done to make your build dependent on a size measured at layout time, consider using a LayoutBuilder, CustomSingleChildLayout, or CustomMultiChildLayout. If, on the other hand, the one frame delay is the desired effect, for example because this is an animation, consider scheduling the frame in a post-frame callback using SchedulerBinding.addPostFrameCallback or using an AnimationController to trigger the animation.!

To Reproduce Steps to reproduce the behavior:

  1. Go to DashChat
  2. Type some messages until you can scroll
  3. Type on the DashChat or press the back button

Expected behavior No error should occur and you can still send messages

Screenshots n/a

Desktop (please complete the following information):

  • OS: Windows
  • Device: Xiaomi Mi 9
  • Flutter Version: 1.17.5
  • Dart Version: 2.8.4

Additional context n/a

ngoc-quoc-huynh avatar Aug 01 '20 16:08 ngoc-quoc-huynh

I am not able to reproduce it

SebastienBtr avatar Sep 08 '20 09:09 SebastienBtr