我编写的代码将文本放置在容器中的第一行的中心,我需要将其放置在实心正方形(中线)的中心。
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
textFormfield1('name', Controller),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text('Add at 3 images',
textAlign: TextAlign.start,
style: TextStyle(
//color: Colors.grey[400],
fontWeight: FontWeight.bold,
fontSize: 16))
]),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
child: Text(text,
textAlign: TextAlign.center),
width: 100,
height: 100,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.yellow)));
)
),
发生的事情和我需要的照片:https://imgur.com/a/FWdjPYX