How to vertically align row items in flutter?

Posted by Jennifer | Updated on

In this answer, I have shared how to vertically align row items in flutter. The problem is that TextFormField is going to add some padding around itself. Since you just want to align the icon, you should probably just add it to your InputDecoration, and you can abandon using a Row entirely; you can also shift it down a bit to force it in line with the text entry bottom underline with some Padding:

You can skip that Padding if you want it to be aligned the way Flutter thinks it’s supposed to be, but I suspect you might still not be happy with it sitting as high as it does by default.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers