Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 445

Child inside Row not in the center of the w

$
0
0

I just want to create a row with 5 buttons. The problem is that the Child of the button is not centered in the widget as shown in photo: https://i.sstatic.net/lQE48lq9.pngCode is the following:

Row(          children: <Widget>[            const SizedBox(width: 10),            Flexible(              child: ElevatedButton(                child: Icon(                    Icons.menu,size: 24, color: colorScheme.onSecondaryContainer                ),                onPressed: () {                  _scaffoldKey.currentState?.openDrawer();                },              ),            ),            Flexible(              child: TextButton(style : roundedElevatedButtStyle,                  onPressed: () {},                  child: Icon(Icons.question_mark_rounded, size: 24, color: colorScheme.onSecondaryContainer)),            ),            Flexible(              child: TextButton(style : roundedElevatedButtStyle,                  onPressed: () async{await controller.goBack();},                  child: Icon(Icons.arrow_back_rounded, size: 24, color: colorScheme.onSecondaryContainer)),            ),            Flexible(              child: TextButton(style : roundedElevatedButtStyle,                  onPressed: () async{await loadHomePage();},                  child: Icon(Icons.home_outlined, size: 24, color: colorScheme.onSecondaryContainer)),            ),            Flexible(              child: TextButton(style : roundedElevatedButtStyle,                  onPressed: () async{await controller.reload();},                  child: Icon(Icons.refresh_rounded, size: 24, color: colorScheme.onSecondaryContainer)),            ),            Flexible(              child: TextButton(                  style : roundedRedElevatedButtStyle,                  child: isLoading                      ?  Text(                        percentageLoading!,                        style: Theme.of(context)                        .textTheme                        .labelLarge                        ?.copyWith(                        color: colorScheme.onPrimary,                        fontSize: 15,                        letterSpacing: 0.1),                                    ):Icon(Icons.add_circle_outline, size: 24, color: colorScheme.onPrimary),                  onPressed: () async {}),            ),            const SizedBox(width: 10),          ],        ),

How can I solve? This row is placed in a bottomNavigationBar.
Thank you


Viewing all articles
Browse latest Browse all 445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>