在android native中不存在此问题
请任何人能帮助我
我尝试了许多解决方案,例如将容器高度设置为100并在其中放置行并设置对齐中心,但没有找到解决方案
final firstName = new TextFormField(
decoration: InputDecoration(
// border: OutlineInputBorder(),
labelText: _APP_FIRSTNAME_LBL,
contentPadding:
EdgeInsets.only(left: 0.0, top: 8.0, right: 0.0, bottom: 8.0)),
validator: validateName,
onSaved: (String val) {
_mFirstName = val;
},
);
final lastName = new TextFormField(
decoration: InputDecoration(
// border: OutlineInputBorder(),
labelText: _APP_LASTNAME_LBL,
contentPadding:
EdgeInsets.only(left: 0.0, top: 8.0, right: 0.0, bottom:
8.0)),
//obscureText: true,
validator: validateName,
onSaved: (String val) {
_mLastName = val;
});
final rowFirstLastName = new Container(
alignment: Alignment.center,
height: 80,
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Flexible(
child: Padding(
padding: const EdgeInsets.all(0.0),
child: firstName,
),
),
SizedBox(width: 48.0),
new Flexible(
child: Padding(
padding: const EdgeInsets.all(0.0),
child: lastName,
),
),
],
));
如果错误或未在字段上设置,则两个textformfield都应保持相同的对齐方式