-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Replaces textScaleFactor with TextScaler
#128522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaces textScaleFactor with TextScaler
#128522
Conversation
17aa8d7 to
3fe3250
Compare
a10f938 to
acadd43
Compare
ab55c7f to
84fe8c3
Compare
84fe8c3 to
2008762
Compare
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No major issues from me, mostly smaller stuff and questions. Thanks for doing all the work to migrate everything.
| } | ||
|
|
||
| Widget _applyTextScaleFactor(Widget child) { | ||
| final double? textScaleFactor = _options!.textScaleFactor!.scale; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could this go inside the builder method?
| data: MediaQuery.of(context).copyWith(textScaleFactor: 1), | ||
| // the animation, such as the topLargeTitle. The text scaling is disabled to | ||
| // avoid odd transitions between pages. | ||
| return MediaQuery.disableTextScaling( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a convenient method 👍
| // to follow the behavior of `UISearchTextField`. | ||
| final double scaledIconSize = | ||
| MediaQuery.textScaleFactorOf(context) * widget.itemSize; | ||
| final double scaledIconSize = MediaQuery.textScalerOf(context).textScaleFactor * widget.itemSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use .scale here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
widget.itemSize isn't font size. I'll try to migrate it in the future.
| return EdgeInsetsGeometry.lerp(geometry1x, geometry2x, textScaleFactor - 1)!; | ||
| } | ||
| return EdgeInsetsGeometry.lerp(geometry2x, geometry3x, textScaleFactor - 2)!; | ||
| return switch (textScaleFactor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I keep forgetting we can do this now.
| child: MediaQuery.withClampedTextScaling( | ||
| // Constrain the textScaleFactor to the largest supported value to prevent | ||
| // layout issues. | ||
| maxScaleFactor: 1.3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe make 1.3 a constant since it's used a couple of times here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is still unresolved, but looks like a great idea!
| expect(richTextList.any((RichText text) => text.textScaleFactor != 1), isFalse); | ||
|
|
||
| expect(tester.widget<RichText>(find.descendant(of: find.text('content'), matching: find.byType(RichText))).textScaleFactor, 99); | ||
| expect(tester.widget<RichText>(find.descendant(of: find.text('content'), matching: find.byType(RichText))).textScaler, const TextScaler.linear(99.0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate all of the times in this PR that you added .0 to a double. Doubles without .0 is a pet peeve of mine.
| const Size customSize = Size(3.14, 2.72); | ||
| const double customDevicePixelRatio = 1.41; | ||
| const double customTextScaleFactor = 1.62; | ||
| const TextScaler customTextScaler = TextScaler.linear(1.23); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the scale change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are random values I think I just copied them over. Shouldn't really matter.
| ] | ||
| )); | ||
|
|
||
| group('Linear TextScaler', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If you do end up creating a separate text_scaler.dart file, you could put these tests in a new text_scaler_test.dart file. But it's fine either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the TextScaler was moved to its own file. Let's move these tests to their own file as well since they don't relate much to media_quqery_test.dart.
| const TextScaler.linear(2.0), | ||
| ); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing these backwards compatibility tests even though they're short lived!
| /// [TextScaler] changes. Consider overridding the [==] operator if applicable | ||
| /// to avoid unnecessary rebuilds. | ||
| @immutable | ||
| abstract class TextScaler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could this go into its own new file if you wanted?
|
lol @ the title of this PR. Isn't this more accurately described as "Implements TextScaler" or "Replaces textScaleFactor with TextScaler"? 😄 |
| # For documentation about this file format, see | ||
| # https://dart.dev/go/data-driven-fixes. | ||
|
|
||
| # * Fixes in this file are for RichText from the widgets library. * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RichText (as per this comment) or selectable_text (as per the file name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh sorry forgot to change those. Updated.
| # For documentation about this file format, see | ||
| # https://dart.dev/go/data-driven-fixes. | ||
|
|
||
| # * Fixes in this file are for RichText from the widgets library. * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, widget library (as per this comment) or material (as per the file path)?
| - title: "Migrate to 'textScaler'" | ||
| date: 2023-06-09 | ||
| element: | ||
| uris: [ 'widgets.dart' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one isn't re-exported by material and cuppertino? (I believe for most (all?) widget.dart fixes we include those two as well...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to material.dart
| # For documentation about this file format, see | ||
| # https://dart.dev/go/data-driven-fixes. | ||
|
|
||
| # * Fixes in this file are for RichText from the widgets library. * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RichText or EditableText?
| final TextDirection? textDirection; | ||
|
|
||
| /// {@macro flutter.widgets.editableText.textScaleFactor} | ||
| final double? textScaleFactor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this property be deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you list this in the PR description as to be deprecated, would be helpful to mark these with a TODO in the code so we don't forget to do this and people that read this code in the current state are not confused why there are two different ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, what is your plan for actually doing the deprecation for the "to be deprecated" items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll migrate the packages and then add the Deprecated annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll migrate the packages
I can't find where we document it, but we guarantee that the packages in https://github.com/flutter/packages are backwards compatible with x old stable versions. So, it will be quite some time before you can actually migrate these packages to the new API. We shouldn't wait that long to deprecate these - it will just be confusing to have to parallel APIs with no clear indicator which one to use. Typically, we just add ignores for the deprecation message to the lines they appear on in https://github.com/flutter/packages and then land the change in the framework that deprecates them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created flutter/packages#4209 to add ignores. But I'm not sure if changes like that needs a version bump or not.
| double maxScaleFactor = double.infinity, | ||
| required Widget child, | ||
| }) { | ||
| return Builder(builder: (BuildContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert that minScaleFactor and maxScaleFactor are in a legal range?
| final double? fontSize = switch (span.style?.fontSize) { | ||
| final double size when size != fontSizeStack.last => size, | ||
| _ => null, | ||
| }; | ||
| if (fontSize != null) { | ||
| fontSizeStack.add(fontSize); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isnt' this simply:
final double? fontSize = span.style?.fontSize;
if (fontSize != null && fontSize != fontSizeStack.last) {
fontSizeStack.add(fontSize);
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pushing the fontSize to the stack. Whether fontSize is null also indicates if a pop operation is needed at the end. I guess I'll rename the variable to fontSizeToPush
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| // Remove this file once textScaleFactor is removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: phrase this as a TODO?
| }, skip: kIsWeb); // [intended] CkTextStyle doesn't have a custom toString implementation. | ||
| }); | ||
| group('TextPainter', () { | ||
| test('textScaleFactor translates to testScaler', () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| test('textScaleFactor translates to testScaler', () { | |
| test('textScaleFactor translates to textScaler', () { |
| /// The value of this property is only an estimate, so it may not reflect the | ||
| /// exact text scaling strategy this [TextScaler] represents, especially when | ||
| /// this [TextScaler] is not linear. Consider using [TextScaler.scale] instead. | ||
| /// This property exists solely for backward compatibility purposes, such that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, we should mark this @Deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise, we should be more confident about the usage of this property. Right now the document sounds like this will probably go away in the future.
| inClass: 'RichText' | ||
| changes: | ||
| - kind: 'rename' | ||
| newName: 'textScaler.textScaleFactor' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we going to keep this getter forever? otherwise this fix just place them on a temporary state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that textScaler.textScaleFactor is deprecated as well. We should remove this dart fix, otherwise the deprecated warning will persist even after the dart fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same applies to other dart fix that migrate people to textScaler.textScaleFactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be a 2-stage deprecation process: RichText.textScaleFactor will be removed, and after a while TextScaler.textScaleFactor will be removed. In a sense RichText.textScaleFactor is more deprecated than TextScaler.textScaleFactor is and will have a shorter deprecation grace period than textScaler.textScaleFactor.
It does look confusing that dart fix replaces a deprecated getter with another, are you OK if the deprecation message of TextScaler.textScaleFactor is changed to something that tells the developer "this is also deprecated but it's better to use this instead of other textscalefactor"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our deprecation policy will remove deprecated field in terms of per stable release, so if they are deprecated in the same stable release, they will also be remove together.
I also suggest we remove them together since it just prolong the time developer will eventually need to migrate to the scale method, and they are already given long enough time to migrate. It also doesn't make it easier to complete the whole migration if they are in this temporary state.
dev/manual_tests/lib/density.dart
Outdated
| textDirection: _model.rtl ? TextDirection.rtl : TextDirection.ltr, | ||
| child: MediaQuery( | ||
| data: MediaQuery.of(context).copyWith(textScaleFactor: _model.size), | ||
| child: MediaQuery.withClampedTextScaling( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a obscure way to create a linear text scalar
should this do a copyWith TextScaler.linear?
|
|
||
| return MediaQuery( | ||
| data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), | ||
| return MediaQuery.disableTextScaling( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the disableTextScaling method necessary? It looks like either way of setting textScaleFactor = 1.0 or textScaler.noScaling would work. I assume disableTextScaling is here so that there will just be one way to disable scaling, but once textScaleFactor is removed, this method will be redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a convenience method so yes it doesn't do anything special. But I think the implementation is slightly better than just getting MediaQuery.of from CupertinoDatePicker's context, since when MediaQueryData changes only the Builder widget will rebuild (instead of the date picker widget).
This reverts commit b2e22d3.
…aler` (#8903) Corresponds to the framework PR: flutter/flutter#128522 ## Presubmit checklist - [ ] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [ ] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [ ] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. --------- Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]> Co-authored-by: Michael Goderbauer <[email protected]>
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework. I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide. **Why `TextScaler.textScaleFactor`** The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future. ## A full list of affected APIs in this PR Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case. **Replaced**: The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`. **To Be Deprecated**: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated. ### `Painting` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })` argument| Deprecated | Can't replace: https://github.com/superlistapp/super_editor/blob/c47fd38dca4b7f43611690913b551a1773c563d7/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart#L1903-L1905| | `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | | `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | ### `Rendering` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | ### `Widgets` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/test/text_scale_factor_test.dart#LL39C21-L39C35 | | `MediaQueryData.textScaleFactor` getter | Deprecated | | | `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | | | `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet | | `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/_functions_io.dart#L68-L70, No Flutter Fix, not expressible yet | | `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843 | | `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away| | `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/914d120da12fba458c020210727831c31bd71041/packages/rfw/lib/src/flutter/core_widgets.dart#L647 , No Flutter Fix because of dart-lang/sdk#52664 | | `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of dart-lang/sdk#52664 | | `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | | `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of dart-lang/sdk#52664 | | `EditableText.textScaleFactor` getter | Deprecated | | ### `Material` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843, No Flutter Fix because of dart-lang/sdk#52664 | | `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of dart-lang/sdk#52664 | | `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
|
In all my applications, I use things like: This ensures that even if the user changes the font size in the Android configuration, the text will be presented in the default font, without the risk of "overflowing" the screen. The problem is that I haven't found the solution yet, to do the same thing with textScaler. tks |
|
Deprecate
textScaleFactorin favor oftextScaler, in preparation for Android 14 Non-linear font scaling to 200%. TheTextScalerclass can be moved todart:uiin the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework.I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide.
Why
TextScaler.textScaleFactorThe author of a
TextScalersubclass should provide a fallbacktextScaleFactor. By makingTextScaleralso contain thetextScaleFactorinformation it also makes it easier to migrate: if a widget overridesMediaQueryData.textScalerin the tree, for unmigrated widgets in the subtree it would also have to overrideMediaQueryData.textScaleFactor, and that makes it difficult to removeMediaQueryData.textScaleFactorin the future.A full list of affected APIs in this PR
Deprecated: The method/getter/setter/argument is annotated with a
@Deprecated()annotation in this PR, and the caller should replace it withtextScalerinstead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case.Replaced: The method this
textScaleFactorargument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced byTextScaler.To Be Deprecated: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated.
PaintingLibrarytextScaleFactorInlineSpan.build({ double textScaleFactor = 1.0 })argumentTextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })argumentTextStyle.getTextStyle({ double TextScaleFactor = 1.0 })argumentTextPainter({ double TextScaleFactor = 1.0 })constructor argumentTextPainter.textScaleFactorgetter and setterTextPainter.computeWidth({ double TextScaleFactor = 1.0 })argumentTextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })argumentRenderingLibrarytextScaleFactorRenderEditable({ double TextScaleFactor = 1.0 })constructor argumentRenderEditable.textScaleFactorgetter and setterRenderParagraph({ double TextScaleFactor = 1.0 })constructor argumentRenderParagraph.textScaleFactorgetter and setterWidgetsLibrarytextScaleFactorMediaQueryData({ double TextScaleFactor = 1.0 })constructor argumentMediaQueryData.textScaleFactorgetterMediaQueryData.copyWith({ double? TextScaleFactor })argumentMediaQuery.maybeTextScaleFactorOf(BuildContext context)static methodMediaQuery.textScaleFactorOf(BuildContext context)static methodRichText({ double TextScaleFactor = 1.0 })constructor argumentRichText.textScaleFactorgetterText({ double? TextScaleFactor = 1.0 })constructor argumentText.rich({ double? TextScaleFactor = 1.0 })constructor argumentText.textScaleFactorgetterEditableText({ double? TextScaleFactor = 1.0 })constructor argumentEditableText.textScaleFactorgetterMaterialLibrarytextScaleFactorSelectableText({ double? TextScaleFactor = 1.0 })constructor argumentSelectableText.rich({ double? TextScaleFactor = 1.0 })constructor argumentSelectableText.textScaleFactorgetterA lot of material widgets (
Slider,RangeSlider,TimePicker, and different types of buttons) also change their layout based ontextScaleFactor. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.