flutter设置文本最大宽度

  ConstrainedBox(
                constraints:BoxConstraints(
                  maxWidth: 80,
                ),
              child:Text(
                "sssasdfasdfasdfasfdasffasfasfasdf",
                overflow: TextOverflow.ellipsis,
                softWrap:true,
                style: TextStyle(
                    fontSize: 20,
                  ),
              ) ,

            ),

 

你可能感兴趣的:(flutter)