Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the route cause of Yellow underline for the Text in Flutter

I am new to Flutter. I am preparing Login page. In the same, I am using a Text widget. For that i am getting Yellow double underline.

I am trying to fix with Scaffold as route layout

return new Scaffold(
  body: Container(
    decoration: BoxDecoration(
      image: DecorationImage(
        image: AssetImage("assets/images/bg.png"),
        fit: BoxFit.cover,
      ),
    ),
    child: MaterialApp(
      home: SingleChildScrollView(
        child:Text('Test')
      ),
    ),
  ),
);

Here is my Screenshot

like image 713
Muthu S Avatar asked Nov 15 '25 19:11

Muthu S


1 Answers

Just change the parent of your Scaffold , MaterialApp should be the parent of all of your widgets tree.

  return MaterialApp(
      home: Scaffold(
        body: Container(
          decoration: BoxDecoration(
            image: DecorationImage(
              image: AssetImage("assets/images/bg.png"),
              fit: BoxFit.cover,
            ),
          ),
          child: SingleChildScrollView(child: Text('Test')),
        ),
      ),
    );
like image 57
diegoveloper Avatar answered Nov 17 '25 18:11

diegoveloper