- 18 Sep, 2023 1 commit
-
-
Xilai Zhang authored
Reverts flutter/flutter#125927 context: b/300804374 Looks like a g3 fix might involve changing the names of widget on the customer app, and I am not sure if that would be the right approach forward. Putting up a revert to be safe for now.
-
- 14 Sep, 2023 1 commit
-
-
Justin McCandless authored
New LinkedText widget and TextLinker class for easily adding hyperlinks to text.
-
- 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.
-
- 13 Jan, 2023 1 commit
-
-
Hans Muller authored
-
- 28 Jul, 2022 1 commit
-
-
Greg Spencer authored
-
- 20 Jul, 2022 1 commit
-
-
Bernardo Ferrari authored
-
- 18 Jul, 2022 1 commit
-
-
Alexandre Ardhuin authored
-
- 09 Mar, 2021 1 commit
-
-
LongCatIsLooong authored
-
- 14 Aug, 2020 1 commit
-
-
Alexandre Ardhuin authored
* migrate painting to nullsafety * address review comments
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 30 Jan, 2020 1 commit
-
-
Gary Qian authored
-
- 27 Nov, 2019 1 commit
-
-
Ian Hickson authored
* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
-
- 07 Jun, 2019 2 commits
-
-
Gary Qian authored
Reland "Text inline widgets, TextSpan rework (#30069)" with improved backwards compatibility (#34051)
-
- 06 Jun, 2019 1 commit
-
-
Gary Qian authored
-
- 05 Jun, 2019 1 commit
-
- 04 Jun, 2019 1 commit
-
-
Gary Qian authored
* Merge in changes for inline widgets * Make analyzer happy, fix tests * Fix analyzer * Add missing doc * Docs on RichText * Fix analyzer some more * Remove whitespace at end of line * Update goldens * Text fixes * Analyzer
-
- 27 Feb, 2019 1 commit
-
-
liyuqian authored
This reverts commit adc8e159. This should be safe to land once https://github.com/flutter/flutter/pull/28530 gets merged Merge on yellow doc test because the doc test is actually green.
-
- 23 Feb, 2019 1 commit
-
-
liyuqian authored
This reverts commit a44f174e. Reason: start_up tests become flaky. See https://github.com/flutter/flutter/issues/28374 TBR: xster Merge on red to fix the tree
-
- 22 Feb, 2019 1 commit
-
-
liyuqian authored
This patch adds a default shader warm up process which moves shader compilation from the animation time to the startup time. This also provides an extension for `runApp` so developers can customize the warm up process. This should reduce our worst_frame_rasterizer_time_millis from ~100ms to ~20-30ms for both flutter_gallery and complex_layout benchmarks. Besides, this should also have a significant improvement on 90th and 99th percentile time (50%-100% speedup in some cases, but I haven't tested them thoroughly; I'll let our device lab collect the data afterwards). The tradeoff the is the startup time (time to first frame). Our `flutter run --profile --trace-startup` seems to be a little noisy and I see about 100ms-200ms increase in that measurement for complex_layout and flutter_gallery. Note that this only happens on the first run after install or data wipe. Later the Skia persistent cache will remove the overhead. This also adds a cubic_bezier benchmark to test the custom shader warm up process. This should fix https://github.com/flutter/flutter/issues/813 (either by `defaultShaderWarmUp`, or a `customShaderWarmUp`).
-
- 20 Feb, 2019 1 commit
-
-
xster authored
-
- 04 Feb, 2019 1 commit
-
-
Gary Qian authored
Integrate Strut: Add StrutStyle, expose Strut API, wire up strut with dart:ui, Roll engine 31a7f4d..e7eb1c8 (7 commits) (#26332) Includes a breaking change to dart:ui ParagraphStyle where lineHeight is renamed to height for consistency with TextStyle.
-
- 10 Jan, 2019 1 commit
-
-
Sander Dalby Larsen authored
* Added the superellipse (a.k.a. squircle) shape to flutter, which is needed to recreate some cupertino components, e.g. buttons in pixel-perfect detail (issue #13914).
-
- 15 Oct, 2018 1 commit
-
-
Gary Qian authored
* Add support for shadows in text. * Use dart:ui Shadow as base class for Shadows * Update lerp definition * Roll engine 3ffa3629523..84fe4a9f7e24e4 - Text Shadows and update goldens for skia roll. git log 50c2e69daff4e207c54e463d2304139985c7511c..32f417db0d566d354605305cb29c251276fa65ee --oneline --no-merges 32f417db0 Roll tonic to 077be256142ede39a271385907faadf4fcc62a4d. (#6541) 4ee77256c Revert "Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)" (#6537) 964acafeb Roll src/third_party/skia 646d917d3c71..c6a17104ad68 (1 commits) (#6536) d4bae4ca4 Roll src/third_party/skia 2b2c00f6ec36..646d917d3c71 (1 commits) (#6535) ff93ccf47 Roll src/third_party/skia 681692726fc0..2b2c00f6ec36 (1 commits) (#6534) a4161c895 Roll src/third_party/skia 23775a2e9736..681692726fc0 (1 commits) (#6532) 116072e46 Roll src/third_party/skia 7435f2553f53..23775a2e9736 (1 commits) (#6531) ef0b0f6e9 Roll src/third_party/skia bc7a51e79c5b..7435f2553f53 (1 commits) (#6530) f46b7b971 Roll src/third_party/skia b28db529c866..bc7a51e79c5b (1 commits) (#6529) 9033c3902 Roll src/third_party/skia 7e67041a1428..b28db529c866 (1 commits) (#6528) e6887a412 Add missing imports for unicode/utf16.h (#6524) 1242f6dfe Roll src/third_party/skia d38382d060ca..7e67041a1428 (2 commits) (#6527) a1bbea77c Add a no-op platform view layer. (#6505) 2bb3afad8 Roll src/third_party/skia 21bd60daa3f3..d38382d060ca (10 commits) (#6526) 75e875240 Fix the Mac embedder build (#6525) 436f9707b Add version check for dismissable (#6522) 7767c785b Provide a default GL function resolver in the embedder (#6523) 32841dd89 Case-insensitive matching of family names for custom fonts (#6519) a9076c7e6 Roll src/third_party/skia 419709dbb167..21bd60daa3f3 (11 commits) (#6520) f2e7441b5 An API for loading fonts from a buffer provided by the application (#6508) 05aac0f27 fix ResourceExtractor npe. (#6461) cf5a2a145 Roll src/third_party/skia b27a9cf2f4a8..419709dbb167 (16 commits) (#6517) 84fe4a9f7 Re-revert invalid line height tests (#6516) 5f529566c Add support for text shadows (#6385) e44c10c96 Reland "Share engine layers with the framework" (#6412) (#6468) ba0449971 Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)
-
- 03 Aug, 2018 1 commit
-
-
liyuqian authored
See details in our proposal for this breaking API change and #18057. This PR setup all code paths to allow the change but doesn't change the clip behavior by itself. We'll change `defaultClipBehavior` from `Clip.antiAlias` to `Clip.none` in the following PR to change the clip behavior and update tests.
-
- 21 Jun, 2018 1 commit
-
-
amirh authored
Move the notch computation from the FAB to the BAB. The notch in the BAB (bottom action bar) for the FAB (floating action button) was previously kept as part of the FAB's implementation. This was done to keep the shape of the FAB and the shape of the notch coupled. That approach resulted in a somewhat complex and 'non Fluttery' mechanism for propagating the notch computation from the FAB to the BAB. This CL uncouples the FAB and the notch computation. With the new API the BAB computes its overall shape including the notch using a NotchedShape delegate. This includes multiple breaking changes: * Scaffold.setFloatingActionButtonNotchFor is deleted. * The ComputeNotch type is deleted. * The hasNotch property of BottomAppBar is deleted. * The notchMargin property of FloatingActionButton is deleted. Quick migration guide from the previous API: | Previous API | New API | | ------------------|-------------| | BottomAppBar(hasNotch: false) | BottomAppBar() | | Using a FloatingActionButton with: BottomAppBar() / BottomAppBar(hasNotch: true) | BottomAppBar(shape: CircularNotchedRectangle()) | | Scaffold.setFloatingActionButtonNotchFor(..) | No longer supported |
-
- 10 May, 2018 1 commit
-
-
Ian Hickson authored
-
- 05 Apr, 2018 1 commit
-
-
Hans Muller authored
-
- 19 Jan, 2018 1 commit
-
-
Ian Hickson authored
* Fix the confusing-zero case with NestedScrollView. * Update mock_canvas.dart * Update tabs_demo.dart * more tweaks
-
- 07 Dec, 2017 1 commit
-
-
Ian Hickson authored
This allows the scheduler library to depend on the services library and the painting library to depend on the scheduler library without the services library having to depend on the scheduler library. While I was at it I also cleaned up some of the binding logic: the licenses logic can now be overridden (and the test library does so), and the image cache can now be overridden as well.
-
- 02 Nov, 2017 1 commit
-
-
Greg Spencer authored
In order to allow chips to be properly drawn when they expand in size (without using IntrinsicHeight), I needed a BoxDecoration shape that would be dependent upon the rendered height of the widget. This seemed to be pretty generally useful, so I added a new ShapeDecoration called StadiumBorder. It uses the minimum dimension to adjust the BorderRadius of a rounded rect in the shape decoration. I also converted some uses of BoxShape to be case statements, updated the chips to use the StadiumBorder decoration, and updated some of the metrics to match the Material spec, as well as implementing lerping to and from StadiumBorder.
-
- 20 Oct, 2017 1 commit
-
-
Ian Hickson authored
-
- 18 Oct, 2017 1 commit
-
-
Ian Hickson authored
-
- 17 Oct, 2017 1 commit
-
-
Ian Hickson authored
-
- 03 Oct, 2017 1 commit
-
-
Ian Hickson authored
I'm about to add the BoxBorder and BorderDirectional classes to this new file, but figured it would make review easier if the move of the existing class happened first.
-
- 02 Oct, 2017 1 commit
-
-
Adam Barth authored
Unlike FractionalOffset, Alignment uses the center as the zero of the coordinate system, which makes the RTL math work out much cleaner. Also, make FractionalOffset into a subclass of Alignment so that clients can continue to use FractionalOffset.
-
- 23 Sep, 2017 1 commit
-
-
Ian Hickson authored
After all my recent refactorings, some of the names were not really reasonable any more.
-
- 22 Sep, 2017 1 commit
-
-
Ian Hickson authored
This is the last class other than BoxDecoration in this file, so by extracting it we finally have all the parts of BoxDecoration extracted.
-
- 21 Sep, 2017 1 commit
-
-
Ian Hickson authored
To make it cleaner when we RTLify these.
-
- 20 Sep, 2017 1 commit
-
-
Ian Hickson authored
-