We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 751539c commit 58630ccCopy full SHA for 58630cc
examples/flutter_gallery/lib/demo/colors_demo.dart
@@ -79,11 +79,11 @@ class ColorSwatchTabView extends StatelessWidget {
79
}
80
81
final ColorSwatch swatch;
82
- final TextStyle blackTextStyle = Typography.black.body1;
83
- final TextStyle whiteTextStyle = Typography.white.body1;
84
-
85
@override
86
Widget build(BuildContext context) {
+ final TextTheme textTheme = Theme.of(context).textTheme;
+ final TextStyle whiteTextStyle = textTheme.body1.copyWith(color: Colors.white);
+ final TextStyle blackTextStyle = textTheme.body1.copyWith(color: Colors.black);
87
List<Widget> colorItems = swatch.colors.keys.map((int index) {
88
return new DefaultTextStyle(
89
style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
0 commit comments