[英]Why text has underline with yellow color with big font size?
因為你還沒有用材質小部件包裝你的Text
小部件。 您可以根據需要使用Scaffold
或具有顏色屬性的Material
小部件進行包裝。
例子:
Scaffold(body: Center(child: Text("Here is the text")))
或者:
Material(color: Colors.white, child: Center(child: Text("Here is the text")))
每個屏幕都應該有一個腳手架小部件
@override
Widget build(BuildContext context) {
return Scaffold(
body:Container(
child:Text("your text"),
),
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.