How to center both?

Asked

Viewed 15 times

-1

I am learning flutter now, and I am making this app very simple and I would like to know how I can centralize these 2 widgets in the center and regardless of the size of the number always stay centered, tried in several ways but I can not at all, follow the code:

inserir a descrição da imagem aqui

All this is inside a Column

Row(children: [
   Expanded(
      child: RotatedBox(
                 quarterTurns: 3,
                 child: Text(
                     "Pessoas", 
                      style: TextStyle(
                          color: Colors.white, fontSize: 40.0),
                            ),
                          ),
                        ),
                        Text(
                          "$countPeople",
                          style:
                              TextStyle(color: Colors.white, fontSize: 150.0),
                          textAlign: TextAlign.center,
                        ),
                      ]),

1 answer

-2

If you want to center in the center, you can use the screen to use the mainAxisAlign property, but if you want the two items with different heights to center on each other, use cross-Axis-center. I don’t quite understand your question, if not this, add more information so I can cage you.

  • Sorry I didn’t explain it very well, but that’s really what you said, I was putting it somewhere else so I wasn’t getting it, but thanks for the help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.