From 42dee0be273adba810ba0b163605cefd5a348a51 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 20 Sep 2016 18:49:46 -0700 Subject: [PATCH] Rename DefaultTextStyle.inherit to merge (#5974) For consistency with IconTheme and TextStyle.merge. Fixes #4652 --- dev/manual_tests/card_collection.dart | 2 +- packages/flutter/lib/src/widgets/text.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/manual_tests/card_collection.dart b/dev/manual_tests/card_collection.dart index b8653782a4..7a36e48d14 100644 --- a/dev/manual_tests/card_collection.dart +++ b/dev/manual_tests/card_collection.dart @@ -316,7 +316,7 @@ class CardCollectionState extends State { } ) ) - : new DefaultTextStyle.inherit( + : new DefaultTextStyle.merge( context: context, style: cardLabelStyle.copyWith( fontSize: _varyFontSizes ? 5.0 + index : null diff --git a/packages/flutter/lib/src/widgets/text.dart b/packages/flutter/lib/src/widgets/text.dart index d85fc778fd..da621ae839 100644 --- a/packages/flutter/lib/src/widgets/text.dart +++ b/packages/flutter/lib/src/widgets/text.dart @@ -12,7 +12,7 @@ import 'media_query.dart'; class DefaultTextStyle extends InheritedWidget { /// Creates a default text style for the given subtree. /// - /// Consider using [DefaultTextStyle.inherit] to inherit styling information + /// Consider using [DefaultTextStyle.merge] to inherit styling information /// from a the current default text style for a given [BuildContext]. DefaultTextStyle({ Key key, @@ -43,7 +43,7 @@ class DefaultTextStyle extends InheritedWidget { /// for the given [BuildContext] and, if non-null, the given [textAlign] /// replaces the [textAlign] from the default text style for the given /// [BuildContext]. - factory DefaultTextStyle.inherit({ + factory DefaultTextStyle.merge({ Key key, @required BuildContext context, TextStyle style,