Let's build something together

flutter

Fixing EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK in testWidgets with FutureBuilders

I have a FutureBuilder that checks for errors and displays an error message. I wanted to write a test to check the rendering of the error, but if I passed a Future.error('some error'), the test would fail with this message: ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following
1 min read