Bilbo Baggins
Bilbo Baggins

Reputation: 175

How to move text to the center with Wrap

I have a struggle to move the text to center with Wrap. I want the beach and colon to be aligned with the circle. I have modified my code but it doesn't seem to move. Is anyone knows how to do it?

enter image description here

Upvotes: 1

Views: 53

Answers (1)

pmatatias
pmatatias

Reputation: 4404

just add crossAlignment. and I also suggest to use spacing instead of manual padding

 child: Wrap(
        alignment: WrapAlignment.spaceBetween,
        crossAxisAlignment: WrapCrossAlignment.center,
        spacing: 8, // horizontal
        runSpacing : 10 // vertical
      ....

enter image description here

Upvotes: 2

Related Questions