Мне нужно показать мой текст в центре контейнера. Попробуйте привести выравнивание в виджет контейнера и текстовый виджет, но не знаете, почему он не отображается по центру по вертикали.
Вот мой код
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: stackHeight * 0.5,
width: stackWidth,
color: Colors.red,
child: Column(
children: <Widget>[
Container(
alignment: Alignment.center,
child: Center(
child: Text(
'Would you like to take coffe',
textAlign: TextAlign.center,
)
)
)
],
),
),
),