Trầ*_*ình 1 text underline flutter yellow flutter-layout
代码截图和结果:
嗨,我有StatelessWidget已经Container在它的构建方法返回与Text小部件的子部件。但它的外观和感觉并不像预期的那样。为什么是yellow下划线,如何删除它?
我试着更换Container用Stack,Column并Row没有什么变化。
因为你还没有用Text材料小部件包装你的小部件。您可以根据需要Scaffold使用Material带有颜色属性的小部件或小部件包装。
例子:
Scaffold(body: Center(child: Text("Here is the text")))
Run Code Online (Sandbox Code Playgroud)
或者:
Material(color: Colors.white, child: Center(child: Text("Here is the text")))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1521 次 |
| 最近记录: |