How to align selected item from DropdownButton in flutter?

Posted by Editorial Staff | Updated on

If you want to align selected item from DropdownButton in flutter? If you don’t mind setting a fixed width you can wrap your DropdownMenuItem Text child in a SizedBox. Then you set the textAlign property to TextAlign.center, like so:


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

Related Questions & Answers