This reverts commit 55f9145ef4.
Turns out that this commit breaks apps that use the material library,
because of the _errorTextStyle DefaultTextStyle which has inherit:true.
Just setting it to false doesn't work, unfortunately, because then you
hit some sort of issue with merging that text style with others that
have inherit:true.
This commit is contained in:
@@ -84,7 +84,7 @@ class ColorSwatchTabView extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Widget> colorItems = swatch.colors.keys.map((int index) {
|
||||
return new DefaultTextStyle.explicit(
|
||||
return new DefaultTextStyle(
|
||||
style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
|
||||
child: new ColorItem(index: index, color: swatch.colors[index])
|
||||
);
|
||||
@@ -93,7 +93,7 @@ class ColorSwatchTabView extends StatelessWidget {
|
||||
|
||||
if (swatch.accentColors != null) {
|
||||
colorItems.addAll(swatch.accentColors.keys.map((int index) {
|
||||
return new DefaultTextStyle.explicit(
|
||||
return new DefaultTextStyle(
|
||||
style: index > swatch.threshold ? whiteTextStyle : blackTextStyle,
|
||||
child: new ColorItem(index: index, color: swatch.accentColors[index], prefix: 'A')
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ class _ContactCategory extends StatelessWidget {
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border(bottom: new BorderSide(color: Theme.of(context).dividerColor))
|
||||
),
|
||||
child: new DefaultTextStyle.explicit(
|
||||
child: new DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.subhead,
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
|
||||
@@ -31,7 +31,7 @@ class DateTimeItem extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
|
||||
return new DefaultTextStyle.explicit(
|
||||
return new DefaultTextStyle(
|
||||
style: theme.textTheme.subhead,
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
|
||||
@@ -94,7 +94,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
appBar: new AppBar(title: new Text('Progress indicators')),
|
||||
body: new DefaultTextStyle.explicit(
|
||||
body: new DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.title,
|
||||
child: new GestureDetector(
|
||||
onTap: _handleTap,
|
||||
|
||||
@@ -26,8 +26,8 @@ class _BarGraphic extends StatelessWidget {
|
||||
width: 200.0,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
decoration: new BoxDecoration(backgroundColor: color),
|
||||
child: new DefaultTextStyle.explicit(
|
||||
style: Typography.white.body1,
|
||||
child: new DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.body1.copyWith(color: Colors.white),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
|
||||
Reference in New Issue
Block a user