How to show snackbar after navigator.pop(context) in Flutter?

匿名 (未验证) 提交于 2019-12-03 01:06:02

问题:

We need close one screen and open second screen. And show snackbar on second screen from first screen.

I tried to use Navigator.push , but this screen is already open and we have this error "Bad state: Stream has already been listened to".

回答1:

Instead of Snackbar i would suggest you to use Flushbar plugin for flutter it is easy to use and it'll take care of everything and u can customize it to a great extent . Snackbar needs a scaffold ancestor to work but Flushbar doesn't and it takes care of all the extra stuff itself and provides with ton of cool features.

Flushbar Plugin here



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!