I recently started exploring Flutter for mobile apps, and I have to say that I like it. But that’s a story for another blog post.
Here I just wanted to warn flutter developers against using Table widget. The philosophy of widget itself it’s fine, the problem is that it hides a very insidious bug which happens randomly, or better, just on some devices.
The thing is on certain screen dimensions, app gets stuck in calculating layout forever – it never exists a while loop. Which is the worst bug you can imagine – it happens only on some devices, it isn’t obvious what’s going on (app just becomes unresponsive), it is heavy on battery and there is no useful feedback whatsoever – like an exception being thrown or a log entry – nothing. The bug itself has to do with rounding double numbers which one should really be careful of when requiring precise results.
I reported the bug with a good description and fine folks at google created a PR in the same day or so and it is already merged in the master branch (hopefully the change does the job for good since it relies on a magic number).
TL;DR; Don’t use Table widget before there is a new version of flutter with this fix since your app might bet stuck for good.