颤动的文本左对齐

时间:2020-01-28 00:33:36

标签: flutter flutter-layout

我正在尝试将所有文​​本向左对齐。但是,它始终位于中间,如下图所示。我尝试使用Align小部件并将textAlign小部件上的Text属性设置为TextAlign.left,但是没有运气。

enter image description here

card.dart

Row(
  children: <Widget>[
    Card(
      elevation: 2,
      child: ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(4)),
        child: Image.network('https://loremflickr.com/100/100'),
      ),
    ),
    Padding(
      padding: const EdgeInsets.only(left: 8),
      child: Column(
        children: <Widget>[
          Align(
            alignment: Alignment.centerLeft,
            child: Text(
              'Marry Jane',
              textAlign: TextAlign.left,
              style: TextStyle(fontSize: 16),
            ),
          ),
          Align(
            alignment: Alignment.centerLeft,
            child: Text(
              'Make-up Artist',
              textAlign: TextAlign.left,
              style: TextStyle(fontSize: 14, color: Color(0xff666666)),
            ),
          ),
          Row(
            children: <Widget>[
              Text(
                '3.5',
                textAlign: TextAlign.left,
                style: TextStyle(fontSize: 18, color: Color(0xff666666)),
              ),
              Icon(FontAwesomeIcons.starHalf)
            ],
          )
        ],
      ),
    )
  ],
),

1 个答案:

答案 0 :(得分:3)

您是否尝试过给Column CrossAxisAlignment.start?

EventListener