File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
examples/flutter_gallery/lib/demo Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -79,11 +79,11 @@ class ColorSwatchTabView extends StatelessWidget {
79
79
}
80
80
81
81
final ColorSwatch swatch;
82
- final TextStyle blackTextStyle = Typography .black.body1;
83
- final TextStyle whiteTextStyle = Typography .white.body1;
84
-
85
82
@override
86
83
Widget build (BuildContext context) {
84
+ final TextTheme textTheme = Theme .of (context).textTheme;
85
+ final TextStyle whiteTextStyle = textTheme.body1.copyWith (color: Colors .white);
86
+ final TextStyle blackTextStyle = textTheme.body1.copyWith (color: Colors .black);
87
87
List <Widget > colorItems = swatch.colors.keys.map ((int index) {
88
88
return new DefaultTextStyle (
89
89
style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
You can’t perform that action at this time.
0 commit comments