-2
Good afternoon, everyone!
I’m starting now to learn to mess with flutter
, and I’m having doubts about the alignment of the words underneath the Suspected and Investigated cards.
I would like to leave them centered as well as the word Suspicious in the center of the card. I wanted to do the same for the word Investigated. returning in a Gridview
What would be the correct method? Follow my code:
Container(
padding: const EdgeInsets.all(2.0),
width: 400,
height: 30,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
'Suspeitos',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),
),
Text('Investigados',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold))
],
);
Very good guy thanks, however the way you taught me, it creates one on the other side if I pass more parameters in the function for example _buildCardText('Suspects'), _buildCardText('Investigated'), it creates one next to the other there if I pass again for example 3 times buildCardText('Suspects'), _buildCardText('Investigated'), _buildCardText('Confirmed'), he keeps stacking one side to the other and I needed him to get the cards on the other side passed more vestments he keeps creating on the bottom in a new Row
– Victor
would be in case return in a gridview in that code
– Victor
But that’s not what your original question was asking, you didn’t mention there were more cards. Well, in that case, just use the Gridview https://api.flutter.dev/flutter/widgets/GridView-class.htmlwidget
– Julio Henrique Bitencourt
Got friend thanks followed the link and a video on youtube about the Gridview obliged
– Victor
@If Victor helped you, could mark the answer as accepted. ;)
– Julio Henrique Bitencourt