Commit 42dee0be authored by Adam Barth's avatar Adam Barth Committed by GitHub

Rename DefaultTextStyle.inherit to merge (#5974)

For consistency with IconTheme and TextStyle.merge.

Fixes #4652
parent bfced97d
...@@ -316,7 +316,7 @@ class CardCollectionState extends State<CardCollection> { ...@@ -316,7 +316,7 @@ class CardCollectionState extends State<CardCollection> {
} }
) )
) )
: new DefaultTextStyle.inherit( : new DefaultTextStyle.merge(
context: context, context: context,
style: cardLabelStyle.copyWith( style: cardLabelStyle.copyWith(
fontSize: _varyFontSizes ? 5.0 + index : null fontSize: _varyFontSizes ? 5.0 + index : null
......
...@@ -12,7 +12,7 @@ import 'media_query.dart'; ...@@ -12,7 +12,7 @@ import 'media_query.dart';
class DefaultTextStyle extends InheritedWidget { class DefaultTextStyle extends InheritedWidget {
/// Creates a default text style for the given subtree. /// 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]. /// from a the current default text style for a given [BuildContext].
DefaultTextStyle({ DefaultTextStyle({
Key key, Key key,
...@@ -43,7 +43,7 @@ class DefaultTextStyle extends InheritedWidget { ...@@ -43,7 +43,7 @@ class DefaultTextStyle extends InheritedWidget {
/// for the given [BuildContext] and, if non-null, the given [textAlign] /// for the given [BuildContext] and, if non-null, the given [textAlign]
/// replaces the [textAlign] from the default text style for the given /// replaces the [textAlign] from the default text style for the given
/// [BuildContext]. /// [BuildContext].
factory DefaultTextStyle.inherit({ factory DefaultTextStyle.merge({
Key key, Key key,
@required BuildContext context, @required BuildContext context,
TextStyle style, TextStyle style,
......
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