文本下划线带有黄色。会发生什么?

问题描述 投票:0回答:1

enter image description here

大家好,我有问题,我需要一些帮助我的代码发生了什么?我用堆栈,列,行...替换了容器,什么都没有改变。黄色底线是什么?以及如何删除它

flutter text flutter-layout underline yellow
1个回答
0
投票

因为您还没有将Text小部件包裹在材质小部件中。您可以根据需要使用Scaffold或带有颜色属性的Material小部件进行包装。

示例:

Scaffold(body: Center(child: Text("Here is the text")))

或:

Material(color: Colors.white, child: Center(child: Text("Here is the text")))
© www.soinside.com 2019 - 2024. All rights reserved.