How to Show Dialogs in Flutter Integration Tests

Alfred Schilken
4 min readDec 27, 2021

What? A test shows a Dialog?

Normally, only your application displays dialogs or alerts. An integration test only runs the application and may check if the correct dialog is displayed. The other day I stumbled across a blog with an example that displays a dialog directly from the test code. I tried it out and it works!

Alfred Schilken

Software Developer for more than 35 years, started with C and C++, after Java, Python, Groovy, Lua, Golang and Swift now focussing on Dart and Flutter