Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("text 1"),
Text("text 2"),
]
)
You can use the crossAxisAlignment property to center Row children vertically.
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("text 1"),
Text("text 2"),
]
)
You can use the MainAxisAlignment property to center Row children horizontally.
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("text 1"),
Text("text 2"),
]
)
0 Comments