Answers for "flutter button side by side"

0

How can I display buttons side-by-side in Flutter?

Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            OutlinedButton(
              onPressed: (){}, 
              child: Text('OutlinedButton'),
            ),
            ElevatedButton(
              child: Text('ElevatedButton'),
              onPressed: () {},
            ),
            TextButton(
              onPressed: (){}, 
              child: const Text('TextButton')
            ),
          ],
        ),
Posted by: Guest on August-24-2021
0

align column to center of flex flutter

// If you want the whole table to be Centered, use the mainAxisAlignment property of Column.
///Column
mainAxisAlignment: MainAxisAlignment.center //Center Column contents vertically,
crossAxisAlignment: CrossAxisAlignment.center //Center Column contents horizontally,

///Row
mainAxisAlignment: MainAxisAlignment.center //Center Row contents horizontally,
crossAxisAlignment: CrossAxisAlignment.center //Center Row contents vertically,
Posted by: Guest on August-28-2020

Browse Popular Code Answers by Language