From a28f4e3a6c0577c414ef06783eaf1227de19fdad Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Tue, 28 Nov 2023 09:57:04 +0100 Subject: [PATCH] Fix textScalerOf and maybeTextScalerOf documentations (#139123) ## Description This PR fixes an inversion on `MediaQuery.textScalerOf` and `MediaQuery.maybeTextScalerOf `documentation. ## Related Issue Fixes https://github.com/flutter/flutter/issues/139071 ## Tests Documentation only --- packages/flutter/lib/src/widgets/media_query.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/media_query.dart b/packages/flutter/lib/src/widgets/media_query.dart index 11611b5d9b4e..1d0895a895c8 100644 --- a/packages/flutter/lib/src/widgets/media_query.dart +++ b/packages/flutter/lib/src/widgets/media_query.dart @@ -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] @@ -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]