diff --git a/packages/flutter/lib/src/material/app.dart b/packages/flutter/lib/src/material/app.dart index 95e2018e17..2b118f4e69 100644 --- a/packages/flutter/lib/src/material/app.dart +++ b/packages/flutter/lib/src/material/app.dart @@ -14,6 +14,13 @@ import 'material_localizations.dart'; import 'page.dart'; import 'theme.dart'; +/// [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]). const TextStyle _errorTextStyle = const TextStyle( color: const Color(0xD0FF0000), fontFamily: 'monospace', @@ -21,7 +28,8 @@ const TextStyle _errorTextStyle = const TextStyle( fontWeight: FontWeight.w900, decoration: TextDecoration.underline, decorationColor: const Color(0xFFFFFF00), - decorationStyle: TextDecorationStyle.double + decorationStyle: TextDecorationStyle.double, + debugLabel: 'fallback style; consider putting your text in a Material', ); /// An application that uses material design.