The yellow lines come from _errorTextStyle. The documentation states that you should define a DefaultTextStyle parent (or use Material, which does this for you):
MaterialApp uses this TextStyle as its DefaultTextStyle to encourage developers to be intentional about their DefaultTextStyle.
In Material Design, most Text widgets are contained in Material widgets, which sets a specific DefaultTextStyle. If you're seeing text that uses this text style, consider putting your text in a Material widget (or another widget that sets a DefaultTextStyle).
Developing Flutter apps without material is not something most people do, but if that's your use case, you should use DefaultTextStyle.
Contrary to the accepted answer, Theme does not set a DefaultTextStyle, so it does not solve your problem. Scaffold does solve the problem, as it contains Material, which in turn defines DefaultTextStyle, but Scaffold is a bit more than you need for a Dialog, Hero, etc.
To permanently solve this for your whole app, depending on your root widget:
MaterialApp: Set the DefaultTextStyle in your MaterialApp builder. This solves the issue for all the components of your app, not just the current screen you're working on.
WidgetsApp takes a textStyle parameter directly
CupertinoApp looks for a CupertinoTheme parent, so you need to define that above CupertinoApp and define textTheme.
Scaffold, you can just surround yourTextwithMaterialwidget - realpac