Skip to content

misplaced documentation for MediaQuery's textScalerOf and maybeTextScalerOf methods #139071

@jeetparte

Description

@jeetparte

The current documentation for maybeTextScalerOf is showing

Returns the [TextScaler] for the nearest [MediaQuery] ancestor or [TextScaler.noScaling] if no such ancestor exists.

while the documentation for textScalerOf is showing

Returns the [TextScaler] for the nearest [MediaQuery] ancestor or null if no such ancestor exists.

Looks like the two got exchanged.

Source code location:
https://github.com/flutter/flutter/blob/db7ef5bf9f59442b0e200a90587e8fa5e0c6336a/packages/flutter/lib/src/widgets/media_query.dart#L1300C22-L1300C39

flutter --version output:

Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (12 days ago) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2

Metadata

Metadata

Assignees

Labels

d: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions