TextBaseline's alphabetic and ideographic enums do not work in Flutter

前端 未结 3 1079
囚心锁ツ
囚心锁ツ 2021-01-13 09:34

I thought I understand how these enums work based on this post. When I tried it using the following code, it does not seem to work.

Row(
  mainAxisAlignment:         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-13 09:58

    Screenshot:


    You don't need baseline.

    Row(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.end,
      children: [
        Text(
          'abcdefg',
          style: TextStyle(fontSize: 50.0, fontWeight: FontWeight.w900),
        ),
        Text(
          'hi',
          style: TextStyle(fontSize: 15.0),
        ),
      ],
    )
    

提交回复
热议问题