Why text has underline with yellow color with big font size?
2,595
Because of you havent wrap your Text
widget with a material widget. You can wrap with a Scaffold
or with Material
widget with color property as you want.
Example:
Scaffold(body: Center(child: Text("Here is the text")))
or:
Material(color: Colors.white, child: Center(child: Text("Here is the text")))
Author by
Trần Thanh Bình
Updated on December 18, 2022Comments
-
Trần Thanh Bình over 1 year
Screenshot of the code and it's result:
Hi, I have
StatelessWidget
which hasContainer
returning in its build method and theText
widget as a child widget. But it's look and feel is not as expected. Why is theyellow
underline and how can I remove it?I tried replacing the
Container
withStack
,Column
andRow
nothing change. -
lolelo almost 3 yearsThe application root widget is set to scaffold in material app, one area of the ui shows yellow lines. Should they be wrapped, directly - even though the application root is scaffold?