- 17 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
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 https://github.com/dart-lang/sdk/issues/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 https://github.com/dart-lang/sdk/issues/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 https://github.com/dart-lang/sdk/issues/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 https://github.com/dart-lang/sdk/issues/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 https://github.com/dart-lang/sdk/issues/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.
-
- 21 Apr, 2023 1 commit
-
-
Bruno Leroux authored
## Description This PR introduces `DefaultSelectionStyle.mouseCursor` to configure the mouse cursor over selectable text. It also applies this solution to `InkResponse` to make the mouse cursor win over the default one provided by selectable `Text` for many Material components (such as buttons). ### Before https://user-images.githubusercontent.com/840911/233627729-ddf98e2a-444d-4c6d-a6d5-f521982f48dd.mov ### After https://user-images.githubusercontent.com/840911/233627718-8871a68f-d33c-44cf-b4a1-91bb1fcdf076.mov ## Related Issue Fixes https://github.com/flutter/flutter/issues/104595 ## Tests Adds 6 tests.
-
- 08 Mar, 2023 1 commit
-
-
Bruno Leroux authored
Add one DefaultTextStyle example
-
- 24 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes
-
- 09 Dec, 2022 1 commit
-
-
Callum Moffat authored
-
- 31 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 09 Sep, 2022 1 commit
-
-
Greg Spencer authored
-
- 11 Aug, 2022 1 commit
-
-
Ian Hickson authored
-
- 10 Aug, 2022 1 commit
-
-
Ian Hickson authored
-
- 24 Jun, 2022 1 commit
-
-
Alexandre Ardhuin authored
-
- 26 May, 2022 1 commit
-
-
Pierre-Louis authored
* Use `curly_braces_in_flow_control_structures` for `widgets` * fix comments * fix comments
-
- 24 May, 2022 1 commit
-
-
chunhtai authored
* Support global selection * addressing comments * add new test * Addressing review comments * update * addressing comments * addressing comments * Addressing comments * fix build
-
- 27 Apr, 2022 1 commit
-
-
Pierre-Louis authored
-
- 14 Apr, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 21 Mar, 2022 1 commit
-
-
Pierre-Louis authored
* fix deprecated_new_in_comment_reference for `material` library in a future version of the SDK, these will be flagged, fix them now * Update pubspec.yaml
-
- 01 Dec, 2021 1 commit
-
-
Greg Spencer authored
-
- 15 Sep, 2021 1 commit
-
-
Pierre-Louis authored
* add `semanticsLabel` to `SelectableText` * remove unused vars * Squashed commit of the following: commit 3e687a9f Author: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Date: Tue Sep 14 17:42:05 2021 -0400 Roll Plugins from 4a98e239b131 to b85edebe7134 (2 revisions) (#90083) commit ad936b4e Author: Christopher Fujino <christopherfujino@gmail.com> Date: Tue Sep 14 14:39:17 2021 -0700 [flutter_conductor] Support initial stable release version (#89775) commit ff5dd54c Author: Ian Hickson <ian@hixie.ch> Date: Tue Sep 14 13:02:04 2021 -0700 Mention the ToS on our README (#89765) commit 8587b609 Author: Kate Lovett <katelovett@google.com> Date: Tue Sep 14 14:53:33 2021 -0500 Update local gold api (#90072) commit 7d368dcf Author: Justin McCandless <jmccandless@google.com> Date: Tue Sep 14 12:39:19 2021 -0700 InteractiveViewer with a child of zero size (#90012) Asserts that the InteractiveViewer child can't have zero size. commit 2b4ef184 Author: Akira Aratani <developer.a.akira@gmail.com> Date: Wed Sep 15 03:30:50 2021 +0900 Fix document of the switch. (#89641) commit a2cd16ba Author: Christopher Fujino <christopherfujino@gmail.com> Date: Tue Sep 14 11:22:02 2021 -0700 use test logger, which does not allow colors (#90010) commit 0f0613c0 Author: Varun Sharma <varunsh@stepsecurity.io> Date: Tue Sep 14 11:17:03 2021 -0700 Add specific permissions to .github/workflows/lock.yaml (#89820) commit 2866f79c Author: Jason Simmons <jason-simmons@users.noreply.github.com> Date: Tue Sep 14 10:46:35 2021 -0700 Initialize all bindings before starting the text_editing_action_target test suite (#90067) Fixes https://github.com/flutter/flutter/issues/90057 commit b8899159 Author: Michael Thomsen <mit@google.com> Date: Tue Sep 14 14:08:36 2021 +0200 Change min Dart SDK constraint to track actual version (#88743) commit 3b7adb98 Author: godofredoc <54371434+godofredoc@users.noreply.github.com> Date: Mon Sep 13 21:32:04 2021 -0700 Lock only issues. (#90023) commit 528f77dc Author: Dan Field <dnfield@google.com> Date: Mon Sep 13 19:10:15 2021 -0700 Opacity fix (#90017) * Make sure Opacity widgets/layers do not drop the offset commit 2470f63e Author: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Date: Mon Sep 13 22:07:02 2021 -0400 4a98e239b [flutter_plugin_tools] Make no unit tests fatal for iOS/macOS (flutter/plugins#4341) (#90016) commit a01e4733 Author: stuartmorgan <stuartmorgan@google.com> Date: Mon Sep 13 20:57:05 2021 -0400 Re-enable plugin analysis test (#89856) commit cdad35f2 Author: Aneesh Rao <sidrao2006@gmail.com> Date: Tue Sep 14 05:17:04 2021 +0530 Fix path in example (#84707) commit 576aab08 Author: Christopher Fujino <christopherfujino@gmail.com> Date: Mon Sep 13 15:47:03 2021 -0700 add analysis_options.yaml to dev/conductor (#90005) commit fad5e4cf Author: Jason Simmons <jason-simmons@users.noreply.github.com> Date: Mon Sep 13 13:37:07 2021 -0700 Remove a redundant test case in the flutter_tools create_test (#89872) commit 738430ca Author: Darren Austin <darrenaustin@google.com> Date: Mon Sep 13 13:33:48 2021 -0700 Revert "Removed default page transitions for desktop and web platforms. (#82596)" (#89997) This reverts commit 43e31977 commit 9db9256b Author: Dan Field <dnfield@google.com> Date: Mon Sep 13 13:15:19 2021 -0700 Revert "Make sure Opacity widgets/layers do not drop the offset (#89264)" (#89999) This reverts commit 0d0f7a4f. commit 00f78cf2 Author: keyonghan <54558023+keyonghan@users.noreply.github.com> Date: Mon Sep 13 13:04:01 2021 -0700 renew cirrus key (#89988) commit 826da7f8 Author: engine-flutter-autoroll <engine-flutter-autoroll@skia.org> Date: Mon Sep 13 15:52:03 2021 -0400 cfc8a20a1 renew cirrus key (flutter/plugins#4340) (#89996) commit cd112e55 Author: Anna Gringauze <annagrin@google.com> Date: Mon Sep 13 12:13:42 2021 -0700 Update all packages (#89797)
-
- 14 Apr, 2021 1 commit
-
-
Pedro Massango authored
-
- 31 Mar, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 12 Mar, 2021 1 commit
-
-
Greg Spencer authored
Update samples to use repo analysis options, Fix sample templates and a ton of analyzer issues (#77868)
-
- 05 Jan, 2021 1 commit
-
-
Sam Rawlins authored
-
- 24 Dec, 2020 1 commit
-
-
Darren Austin authored
-
- 11 Dec, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 27 Oct, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 06 Oct, 2020 1 commit
-
-
Alexandre Ardhuin authored
* migrate material to nullsafety * address review comments * address review comments * fix build
-
- 15 Sep, 2020 1 commit
-
-
Alexandre Ardhuin authored
* Reland "Nnbd widgets (#64672)" This reverts commit 127e6790. * remove non-nullable enforcement on AsyncSnapshot * make data param non-nullable for AsyncSnapshot.withData * make some Text params non-nullable
-
- 09 Sep, 2020 2 commits
-
-
Michael Goderbauer authored
This reverts commit e682ec71.
-
Alexandre Ardhuin authored
* migrate widget to nullsafety * remove double blank line after license * address review comments in actions.dart * nullable ObjectKey.value * use local variable oldElement * make State.build non-nullable * make State.context non-nullable * newline at eof * make ProxyWidget.child non-nullable * make _InactiveElements.debugContains non-nullable * make Element.depth non-nullable * make ProxyElement.build non-nullable * make StatefulElement.state non-nullable * remove 'Notice that' * avoid cast of list in RenderObjectElement.updateChildren * make IndexedSlot.value non-nullable * avoid cast of list in MultiChildRenderObjectElement.mount * make some WidgetsApp parameters non-nullable * hitTest take non-nullable position * make ScrollableState.position non-nullable * use _pixels instead of pixels * make ViewportOffset.pixels non-nullable * make param and return type of IndexedWidgetBuilder non-nullable * unused_import * make context param non-nullable for Builder in animated_list.dart * make ScrollMetrics.viewportDimension non-nullable * make ScrollMetrics.{min,max}ScrollExtent non-nullable * make _Location.file non-nullable * _WidgetForTypeTests.createElement throw UnimplementedError * update _NullWidget.build error message * make _ShortcutsState.manager non-nullable * Fix childCount issues for NNBD * fix childCount computation on web * increase max value on js side to compute childCount * make aspect parameter of dependOnInheritedWidgetOfExactType nullable * merge has{min,max}ScrollExtent into hasScrollExtents * update focus_manager.dart * address review comments in icon.dart * address review comments in image.dart * address review comments in routes.dart * address review comments in scroll_activity.dart * update doc comments * make UserScrollNotification.direction non-nullable and required * rename hasScrollExtents to hasContentDimensions * unnecessary late Co-authored-by:
Ian Hickson <ian@hixie.ch>
-
- 08 Sep, 2020 1 commit
-
-
sehee Jeong authored
I modified TextAlign docs because the descriptions of TextAlign.center and Center Widget are so similar that they cause confusion. Fixes https://github.com/flutter/flutter/issues/5805
-
- 28 Aug, 2020 1 commit
-
-
Broccolism authored
-
- 19 Aug, 2020 1 commit
-
-
chunhtai authored
-
- 31 Jul, 2020 1 commit
-
- 28 Jul, 2020 1 commit
-
-
Darren Austin authored
Updated references to the old button classes to the new ones in comments and documentation for classes in the widgets, services and rendering libraries. (#62099)
-
- 23 Jul, 2020 2 commits
-
-
chunhtai authored
- 14 Jul, 2020 1 commit
-
-
Todd Volkert authored
-
- 23 Jun, 2020 2 commits
-
-
chunhtai authored
-
MH Johnson authored
-
- 16 Jun, 2020 1 commit
-
-
MH Johnson authored
-
- 12 Jun, 2020 1 commit
-
-
Jenn Magder authored
This reverts commit 3efc517a.
-