Flutter:文本在行小部件中不排序

时间:2020-06-12 16:54:16

标签: flutter flutter-layout

代码:

Row(
  mainAxisAlignment: MainAxisAlignment.start,
  children: <Widget>[
    Column(
      children: <Widget>[
        Text(
          model.mp3Files[index].artist,
          style: Theme.of(context).textTheme.subtitle1,
        ),
        SizedBox(height: 8.0,),
        Text(
          model.mp3Files[index].album,
          style: Theme.of(context).textTheme.subtitle1,
        ),
      ],
    ),
  ],
)

如何将第一个文本放在左侧?

enter image description here

1 个答案:

答案 0 :(得分:1)

在您的Column

Column(
  crossAxisAlignment: CrossAxisAlignment.start, // add this
  children: [...],
)