代码之家  ›  专栏  ›  技术社区  ›  Runtime Terror

垂直对齐不同权重的文本

  •  0
  • Runtime Terror  · 技术社区  · 6 年前

    我想要两个不同权重的文本垂直对齐。目前我得到的是粗体文本被按下:

    enter image description here

                          Row(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: <Widget>[
                                Center(
                                  child: Text(
                                    'TEST',
                                    textAlign: TextAlign.center,
                                    style: TextStyle(
                                      fontFamily: 'Gilroy',
                                      fontWeight: FontWeight.w300,
                                      fontSize: 20,
                                      decoration: TextDecoration.none,
                                      color: Colors.white),
                                  )
                                ),
                                Center(
                                  child: Text(
                                    'TEXT',
                                    textAlign: TextAlign.center,
                                    style: TextStyle(
                                      fontFamily: 'Gilroy',
                                      fontWeight: FontWeight.w900,
                                      fontSize: 20,
                                      decoration: TextDecoration.none,
                                      color: Colors.white),
                                  ),
                                )
                              ],
                            ),
    
    0 回复  |  直到 6 年前