Skip to content

Commit a28f4e3

Browse files
authored
Fix textScalerOf and maybeTextScalerOf documentations (#139123)
## Description This PR fixes an inversion on `MediaQuery.textScalerOf` and `MediaQuery.maybeTextScalerOf `documentation. ## Related Issue Fixes flutter/flutter#139071 ## Tests Documentation only
1 parent 897c2f8 commit a28f4e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/flutter/lib/src/widgets/media_query.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ class MediaQuery extends InheritedModel<_MediaQueryAspect> {
13291329
static double? maybeTextScaleFactorOf(BuildContext context) => _maybeOf(context, _MediaQueryAspect.textScaleFactor)?.textScaleFactor;
13301330

13311331
/// Returns the [MediaQueryData.textScaler] for the nearest [MediaQuery]
1332-
/// ancestor or null if no such ancestor exists.
1332+
/// ancestor or [TextScaler.noScaling] if no such ancestor exists.
13331333
///
13341334
/// Use of this method will cause the given [context] to rebuild any time that
13351335
/// the [MediaQueryData.textScaler] property of the ancestor [MediaQuery]
@@ -1339,7 +1339,7 @@ class MediaQuery extends InheritedModel<_MediaQueryAspect> {
13391339
static TextScaler textScalerOf(BuildContext context) => maybeTextScalerOf(context) ?? TextScaler.noScaling;
13401340

13411341
/// Returns the [MediaQueryData.textScaler] for the nearest [MediaQuery]
1342-
/// ancestor or [TextScaler.noScaling] if no such ancestor exists.
1342+
/// ancestor or null if no such ancestor exists.
13431343
///
13441344
/// Use of this method will cause the given [context] to rebuild any time that
13451345
/// the [MediaQueryData.textScaler] property of the ancestor [MediaQuery]

0 commit comments

Comments
 (0)