Flutter setState() or markNeedsBuild() called when widget tree was locked

前端 未结 7 1468
忘掉有多难
忘掉有多难 2020-12-03 06:45

I am having trouble finding the source to this exception, and the app is quite complex so it is hard to show any relevant part of the code. This is my repository at the poin

7条回答
  •  一个人的身影
    2020-12-03 07:29

    Special case of using Scaffold and Drawer:

    That fail can also happen if you try to rebuild the tree with opened Drawer. For example if you send a message to a Bloc that forces rebuilding of the whole page/screen.

    Consider to call Navigator.pop(context) first in your tap handler.

提交回复
热议问题