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

Align all the widgets of row to top

I have a Row which contains three widget, [icon, button, text]. I want all of them to align at the top. If the text is long everything is fine. But if the text is short, It is not align.

Here is the code: https://pastebin.com/e4iRVSFz

enter image description here

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 :

  TextButton(
    style: ButtonStyle(
        alignment: Alignment.topLeft
    ),

    onPressed: () {
      // Add your middle widget click logic here
    },
    child: Text(
      'Short',
      style: TextStyle(
        color: Colors.blue,
        decoration: TextDecoration.underline,
      ),
    ),
  ),

try add a ButtonStyle to TextButton

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