我是新手,在最近的广泛编码中,我遇到了一种情况,即我必须不合理地对齐行中的元素。我有3个子元素,分别称为A,B和C。我的要求是到该行最左端的A和B,到最右端的元素C。
期望:
我的代码:
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
CircleAvatar(
backgroundImage: NetworkImage(''),
radius: 30,
),
SizedBox(
width: 10,
),
Flexible(
child: Text('name', overflow: TextOverflow.ellipsis,),
),
SizedBox(
width: 10,
),
Container(
child: ButtonTheme(
height: 25.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0)),
child: RaisedButton(
child: Text(
'Challenge',
style: TextStyle(color: Colors.white, fontSize: 12),
),
onPressed: () {},
),
),
),
],
),
任何人都可以帮助我。预先感谢。
我是新手,在最近的广泛编码中,我遇到了一种情况,即我必须不合理地对齐行中的元素。我有3个子元素,可以分别命名为A,B和C。我的要求是...
尝试一下,效果很好,检查下面的代码: