Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to center one widget among three in a Row?

mainAxisAlignment to center causes all 3 widgets as one to become centered.

How do I center the 2nd widget only, and keep the other two widgets beside the middle 2nd widget?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

create 4 rows , center the middle one with its own alignment. something like this …

Row(
    mainAxisAlignment: MainAxisAlignment.spaceEvenly
  children: 
  [
    Row(children: [...]), // start or end align here if needed
    Row(mainAxisAlignment: MainAxisAlignment.center, children: [...] ),
    Row(children: [...]), // start or end align here if needed
  ],
 ),
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading