From 58630cc209c136a34c0d22b1e2911e64aacb782c Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Tue, 1 Nov 2016 16:11:41 -0700 Subject: [PATCH] Derive colors demo TextStyle from theme (#6632) --- examples/flutter_gallery/lib/demo/colors_demo.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/flutter_gallery/lib/demo/colors_demo.dart b/examples/flutter_gallery/lib/demo/colors_demo.dart index 7d8c4e2c3b..104d35ce18 100644 --- a/examples/flutter_gallery/lib/demo/colors_demo.dart +++ b/examples/flutter_gallery/lib/demo/colors_demo.dart @@ -79,11 +79,11 @@ class ColorSwatchTabView extends StatelessWidget { } final ColorSwatch swatch; - final TextStyle blackTextStyle = Typography.black.body1; - final TextStyle whiteTextStyle = Typography.white.body1; - @override 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); List colorItems = swatch.colors.keys.map((int index) { return new DefaultTextStyle( style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,