Commit 58630cc2 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Derive colors demo TextStyle from theme (#6632)

parent 751539c8
......@@ -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<Widget> colorItems = swatch.colors.keys.map((int index) {
return new DefaultTextStyle(
style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment