Yellow lines under Text Widgets in Flutter?

Question

Asked by dasfima on November 04, 2017 (source).

Working on my first flutter app. The main app screen doesn't have this issue, all the texts show up as they should.

However in this new screen I'm developing, all the text widget have some weird yellow line / double-line underneath.

Any ideas on why this is happening?

Yellow Lines

Answer

Question answered by Rémi R (source).

The problem is having a Scaffold or not. Scaffold is a helper for Material apps (AppBar, Drawer, that sort of stuff). But you're not forced to use Material.

What you're missing is an instance of Theme as a parent.

Why is that important to know? Because when you'll develop a Modal (using showDialog for example), you'll face the same problem. BUT Scaffold is an opaque fullscreen widget! And you obviously don't want that in your Modal.

There are many ways to introduce a Theme instance. In Material App, this is usually achieved by instantiating a Material Widget. And guess what? Scaffold creates one for you. But Dialog too!

FLUTTER
SHARE: