Member-only story
How to “pump” in Flutter
Don’t let your widgets standstill
2 min readOct 26, 2019
When I first tried Flutter, widget testing was the part that confused me the most mainly because it runs on a fake clock and “time” becomes strange.
Let’s use this repository/demo app for demonstration:
Time doesn’t flow until you pump
Flutter widget testing, at first glance, looks like Jest, but if you naively migrate Jest testing philosophy, you will find that your widget never rebuild.
If you are coming from Jest, you will probably find this code completely okay: