Skip to content

Commit

Permalink
Fix textScalerOf and maybeTextScalerOf documentations (#139123)
Browse files Browse the repository at this point in the history
## Description

This PR fixes an inversion on `MediaQuery.textScalerOf` and  `MediaQuery.maybeTextScalerOf `documentation.

## Related Issue

Fixes flutter/flutter#139071

## Tests

Documentation only
  • Loading branch information
bleroux authored Nov 28, 2023
1 parent 897c2f8 commit a28f4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/widgets/media_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ class MediaQuery extends InheritedModel<_MediaQueryAspect> {
static double? maybeTextScaleFactorOf(BuildContext context) => _maybeOf(context, _MediaQueryAspect.textScaleFactor)?.textScaleFactor;

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

/// Returns the [MediaQueryData.textScaler] for the nearest [MediaQuery]
/// ancestor or [TextScaler.noScaling] if no such ancestor exists.
/// ancestor or null if no such ancestor exists.
///
/// Use of this method will cause the given [context] to rebuild any time that
/// the [MediaQueryData.textScaler] property of the ancestor [MediaQuery]
Expand Down

0 comments on commit a28f4e3

Please sign in to comment.