StreamBuilder silents unhandled exceptions. How to make it verbose?

Viewed 110

StreamBuilder catches exceptions and calls builder with snapshot.hasError == true. It's ok in production but in dev I wanna be instantly notified about all exceptions.
How to force StreamBuilder to always print exceptions stacktrace in a console to prevent losing exceptions while developing. My current solution is to create a wrapper widget. Do you have better ideas?

1 Answers

You could just copy and paste the flutter class (F12 to navigate to it - go to implementation ). Change the name to MyStreamBuilder ;) and change the implementation as you wish.

.. 10 minutes later Well after looking into the implementation I think a wrapper might be simpler and you keep connected to the original implementation. But for other classes which are lightweight, I would do the copy and go method.

Related