I am upgrading an older app from Flutter 2 to Flutter 3, and one problem I have encountered is that the TextButton.icon()
goes crazy if child
is a Flexible
. This did not happen with FlatButton.icon()
, which worked just fine.
So I'm wondering if there is a way to use the Dart analyzer to my advantage, to prevent the code from even compiling if I'm passing a Flexible()
as a child to TextButton.icon()
anywhere in the code?
I know that of course I can search and replace in the code, but I'm more interested to know if the Dart analyzer can be used to perform this kind of analysis somehow?