Ikko Eltociear Ashimine
9fa731ddf8
Update semantics.dart ( #145683 )
...
loosing -> losing
2024-03-25 18:17:54 +00:00
Kostia Sokolovskyi
453a04d9f3
TwoDimensionalChildDelegate should dispatch creation and disposal events ( #145684 )
2024-03-25 10:45:02 -07:00
Kostia Sokolovskyi
47bfa827ba
Memory leaks clean up 1 ( #145691 )
2024-03-25 10:36:42 -07:00
Sahil Kachhap
a9f18b803b
[Fix]: Searchbar doesn't lose focus when tapped outside ( #145232 )
...
Added a Fix to search bar that allows it be unfocused when tapped anywhere outside the search bar.
I have attached below the app flow after implementing the fix.
https://github.com/flutter/flutter/assets/54017876/70915c47-9b77-4a43-a128-8706107f921f
Issue that gets resolved by this fix : #145096
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-03-25 17:02:07 +00:00
Kostia Sokolovskyi
2851ed3202
Fix typo in hitTest docs ( #145677 )
...
This PR fixes the typo in the `hitTest` method documentation.
2024-03-25 17:00:06 +00:00
Daco Harkes
baa54fdd76
[deps] Bump native assets dependencies ( #145612 )
...
Roll of a bunch of breaking changes from the native_assets_builder and
native_assets_cli upstream. Most notably:
* https://github.com/dart-lang/native/pull/946
* https://github.com/dart-lang/native/pull/1018
* https://github.com/dart-lang/native/pull/1019
This PR also updates the template in `flutter create
--template=package_ffi` to use the rewritten API.
This PR does not change any functionality in Flutter.
For reference, the same roll in the Dart SDK:
* https://dart-review.googlesource.com/c/sdk/+/357605
* https://dart-review.googlesource.com/c/sdk/+/357623
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-25 15:02:49 +01:00
Taha Tesser
23687c5260
Add AnimationStyle
to showBottomSheet
and showModalBottomSheet
( #145536 )
...
fixes [Introduce animation customizable with `AnimationStyle` to `BottomSheet`](https://github.com/flutter/flutter/issues/145532 )
### Default bottom sheet animation
![00-ezgif com-video-to-gif-converter](https://github.com/flutter/flutter/assets/48603081/a295b002-b310-4dea-8bc4-23b1d299748c )
### Custom bottom sheet animation
![01-ezgif com-video-to-gif-converter](https://github.com/flutter/flutter/assets/48603081/8c5c3d5f-e67d-4ed5-880d-f17d262087e1 )
### No bottom sheet animation
![02-ezgif com-video-to-gif-converter](https://github.com/flutter/flutter/assets/48603081/872409d8-8a8d-4db9-b95b-7f96a62cdffc )
2024-03-25 08:39:05 +00:00
Andrew Kolos
cd785544fa
make hot reload reflect changes to asset transformer configurations ( #144660 )
...
In service of https://github.com/flutter/flutter/issues/143348
This PR makes hot reloads reflect changes to transformer configurations under the `assets` section in pubspec.yaml.
This PR is optimized for ease of implementation, and should not be merged as-is. If it is merged as-is, seriously consider creating a tech debt issue and assigning it to someone to make sure it gets resolved.
2024-03-25 04:13:11 +00:00
Polina Cherkasova
9fee27b244
Leak clean up. ( #144803 )
...
Fix some leaks and mark others.
[Known leaks](https://github.com/issues?q=is%3Aopen+is%3Aissue+label%3A%22a%3A+leak+tracking%22+-label%3A%22c%3A+new+feature%22+ )
2024-03-24 18:01:17 +00:00
Pierre-Louis
9ae8a6b7d5
Reland #128236 "Improve build output for all platforms" ( #145495 )
...
Reland #128236 , reverted in https://github.com/flutter/flutter/pull/143125 , https://github.com/flutter/flutter/pull/145261 , and https://github.com/flutter/flutter/pull/145487 .
The errors were raised in post-submit tests on Windows. I have finally obtained a Windows machine to reproduce the errors locally and adjust the test (remove size expectation and rename output `.exe`).
## Original description
Improves the build output:
1. Gives confirmation that the build succeeded, in green
1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open
1. Gives the size of the built executable (when the built executable is self contained)
### `apk`, `appbundle`
<img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d ">
<img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436 ">
### `macos`, `ios`, `ipa`
Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`.
<img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257 ">
<img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50 ">
<img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698 ">
### `windows`, `linux`, and `web`
Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below).
<img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b ">
<img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2 ">
<img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5 ">
### Size reporting
When applicable, the printed size matches the OS reported size.
- macOS
<img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce ">
- Windows
<img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7 ">
- Linux
<img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b ">
## Related issues
Part of #120127
Fixes https://github.com/flutter/flutter/issues/121401
2024-03-23 12:05:21 +00:00
David Iglesias
df75d249b2
[web][docs] Improve HtmlElementView widget docs. ( #145192 )
...
This PR expands the `HtmlElementView` widget DartDocs, with the following sections:
* Usage: How to use the widget, two ways:
* The `HtmlElementView.fromTagName` constructor
* The `PlatformViewRegistry` way
* Lifecycle: There's an `onCreated` callback on the widget. When does it get called?
* HTML Lifecycle: How to listen to events coming from the DOM.
* Visibility: what is the `isVisible` property for?
Small additional tweaks here and there to mention common pitfalls of using HtmlElementView on the web, and mentions to workarounds, like `package:pointer_interceptor`.
## Issues
* Fixes: https://github.com/flutter/flutter/issues/143922
* Fixes: https://github.com/flutter/flutter/issues/49634
* Related: https://github.com/flutter/website/issues/5063
2024-03-23 00:53:26 +00:00
Kate Lovett
4820e0cd9f
Fix skipping golden comparator for CI environments ( #145619 )
...
Fixes https://github.com/flutter/flutter/issues/145618
The local file comparator was being used in post submit for the Linux coverage shard. This corrects it to choose the skipping comparator.
2024-03-22 20:45:35 +00:00
Kate Lovett
c5047e0ada
2DScrollView - Fix drag when one axis does not have enough content ( #145566 )
...
Fixes https://github.com/flutter/flutter/issues/144982
For reference, may have to do with #138442 when we reworked the gesture handling. The adjustments to the comments here were certainly from #138442 not updating them. Confused myself for a minute or two. ð
2024-03-22 16:42:19 +00:00
Nate
7fb35db62f
Intensive if
chain refactoring ( #145194 )
...
This pull request refactors if-statements into switch expressions, as part of the effort to solve issue #144903 .
Making changes beyond just swapping syntax is more difficult (and also more difficult to review, I apologize), but much more satisfying too.
2024-03-22 13:55:06 +00:00
Bruno Leroux
859eb2eda9
Adds numpad navigation shortcuts for Linux ( #145464 )
...
## Description
This PR adds shortcuts related to numpad keys on Linux.
## Related Issue
Linux side for https://github.com/flutter/flutter/issues/144936
## Tests
Adds 2 tests.
2024-03-22 06:22:09 +00:00
LongCatIsLooong
d755bc222b
Replace RenderBox.compute*
with RenderBox.get*
and add @visibleForOverriding
( #145503 )
...
`@visibleForOverriding` + `@protected` unfortunately does not catch the case where a `compute*` method was overridden in a subtype and the overide was called in that same type's implementation.
I did not add a `flutter_ignore` for this because it doesn't seem there will be false positives.
2024-03-22 02:44:55 +00:00
Greg Spencer
0f685f88c6
Add some cross references in the docs, move an example to a dartpad example ( #145571 )
...
## Description
This adds some "See also" links to some docs for `TweenAnimationBuilder` and `ValueListenableBuilder`.
Also, moved a "snippet" example in `ValueListenableBuilder` into the examples directory as a Dartpad example.
## Tests
- Added test for the example.
2024-03-22 02:35:11 +00:00
Bernardo Ferrari
784f19c49c
Fix BorderSide.none
requiring explicit transparent color for UnderlineInputBorder
( #145329 )
...
Fix could have been "paint transparent when Border none" but, following other Borders, we will just not paint anything.
Fix https://github.com/flutter/flutter/issues/143746
2024-03-22 02:31:16 +00:00
Michael Goderbauer
11c034f037
Fix nullability of getFullHeightForCaret ( #145554 )
...
Fixes https://github.com/flutter/flutter/issues/145507 .
Looks like this was accidentally migrated to nullable all the way back when we switched to NNBD.
2024-03-21 23:38:16 +00:00
Lau Ching Jun
c759c22e71
Fixed race condition in PollingDeviceDiscovery. ( #145506 )
...
There are two issues in the previous implementation:
1. `_populateDevices` will return the devices from `deviceNotifier` if it had been initialized, assuming that once it's initialized, it has been properly populated. That assumption is not true because calling getters like `onAdded` would initialize `deviceNotifier` without populating it.
2. `deviceNotifier` instance might be replaced in some cases, causing `onAdded` subscribers to lose any future updates.
To fix (1), this commit added the `isPopulated` field in `deviceNotifier` as a more accurate flag to determine if we need to populate it.
To fix (2), this commit made `deviceNotifier` a final member in `PolingDeviceDiscovery`.
2024-03-21 22:37:08 +00:00
Ian Hickson
afe01503d8
Clarify AutomaticKeepAliveClientMixin semantics in build method ( #145297 )
...
This should help folks who trace the code before reading the documentation.
2024-03-21 21:28:07 +00:00
Michael Goderbauer
eaf509aaf8
Eliminate more window singleton usages ( #145560 )
...
These usages in strings slipped through the initial clean-up.
2024-03-21 20:59:25 +00:00
Jackson Gardner
31209d04ff
flutter test --wasm
support (#145347 )
...
* Adds support for `flutter test --wasm`.
* The test compilation flow is a bit different now, so that it supports compilers other than DDC. Specifically, when we run a set of unit tests, we generate a "switchboard" main function that imports each unit test and runs the main function for a specific one based off of a value set by the JS bootstrapping code. This way, there is one compile step and the same compile output is invoked for each unit test file.
* Also, removes all references to `dart:html` from flutter/flutter.
* Adds CI steps for running the framework unit tests with dart2wasm+skwasm
* These steps are marked as `bringup: true`, so we don't know what kind of failures they will result in. Any failures they have will not block the tree at all yet while we're still in `bringup: true`. Once this PR is merged, I plan on looking at any failures and either fixing them or disabling them so we can get these CI steps running on presubmit.
This fixes https://github.com/flutter/flutter/issues/126692
2024-03-21 20:08:07 +00:00
Pascal Welsch
4bbe6d594d
Add WidgetsApp.debugShowWidgetInspectorOverride again (deprecated) ( #145334 )
...
`WidgetsApp.debugShowWidgetInspectorOverride` was replaced with ` WidgetsBinding.instance.debugShowWidgetInspectorOverrideNotifier` in https://github.com/flutter/flutter/pull/144029 .
The old API was removed, not deprecated.
It is used by some [open-source projects](https://github.com/search?q=WidgetsApp.debugShowWidgetInspectorOverride&type=code ), thus I'm making the effort of bringing the API back as deprecated.
Fixes https://github.com/flutter/flutter/issues/145333
2024-03-21 17:43:05 +00:00
flutter-pub-roller-bot
61b3f975a0
Roll pub packages ( #145476 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2024-03-21 00:09:24 +00:00
Vatsal Bhesaniya
01fc13d9f9
Add helper widget parameter to InputDecoration ( #145157 )
...
This pull request introduces a new field named `helper` to the InputDecoration class. This field allows for specifying a widget containing contextual information about the InputDecorator.child's value. Unlike `helperText`, which accepts a plain string, `helper` supports widgets, enabling functionalities like tappable links for further explanation. This change aligns with the established pattern of `error`, `label`, `prefix`, and `suffix`.
fixes [#145163 ](https://github.com/flutter/flutter/issues/145163 )
2024-03-20 20:48:05 +00:00
Gray Mackall
39bdff16c1
Remove embedding v1 code in framework ( #144726 )
...
Pre work for https://github.com/flutter/engine/pull/51229 . Removes a lot of code referencing v1 of the android embedding, though not necessarily all of it (I may have missed some, it is hard to know).
Will hopefully make landing that PR less painful (or maybe painless?)
2024-03-20 20:34:14 +00:00
auto-submit[bot]
a01eac78ee
Reverts "Reland #128236 "Improve build output for all platforms" ( #145376 )" ( #145487 )
...
Reverts: flutter/flutter#145376
Initiated by: loic-sharma
Reason for reverting: It caused the following post-submit failures:
1. https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752928710548811665/+/u/run_run_release_test_windows/stdout
2. https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752927564747697169/+/u/run_run_release_test_windows/stdout
Original PR Author: guidezpl
Reviewed By: {loic-sharma}
This change reverts the following previous change:
Reland #128236 , reverted in https://github.com/flutter/flutter/pull/143125 and https://github.com/flutter/flutter/pull/145261 .
This PR contains 3 additional commits, fixing post-submit tests on Android and Windows.
## Original description
Improves the build output:
1. Gives confirmation that the build succeeded, in green
1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open
1. Gives the size of the built executable (when the built executable is self contained)
### `apk`, `appbundle`
<img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d ">
<img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436 ">
### `macos`, `ios`, `ipa`
Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`.
<img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257 ">
<img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50 ">
<img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698 ">
### `windows`, `linux`, and `web`
Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below).
<img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b ">
<img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2 ">
<img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5 ">
### Size reporting
When applicable, the printed size matches the OS reported size.
- macOS
<img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce ">
- Windows
<img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7 ">
- Linux
<img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b ">
## Related issues
Part of #120127
Fixes https://github.com/flutter/flutter/issues/121401
2024-03-20 18:18:25 +00:00
Pierre-Louis
6b568f3943
Reland #128236 "Improve build output for all platforms" ( #145376 )
...
Reland #128236 , reverted in https://github.com/flutter/flutter/pull/143125 and https://github.com/flutter/flutter/pull/145261 .
This PR contains 3 additional commits, fixing post-submit tests on Android and Windows.
## Original description
Improves the build output:
1. Gives confirmation that the build succeeded, in green
1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open
1. Gives the size of the built executable (when the built executable is self contained)
### `apk`, `appbundle`
<img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d ">
<img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436 ">
### `macos`, `ios`, `ipa`
Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`.
<img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257 ">
<img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50 ">
<img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698 ">
### `windows`, `linux`, and `web`
Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below).
<img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b ">
<img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2 ">
<img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5 ">
### Size reporting
When applicable, the printed size matches the OS reported size.
- macOS
<img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce ">
- Windows
<img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7 ">
- Linux
<img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b ">
## Related issues
Part of #120127
Fixes https://github.com/flutter/flutter/issues/121401
2024-03-20 16:14:53 +00:00
Lau Ching Jun
a80286270c
Fix remote DDS in proxied devices. ( #145346 )
...
A ProxiedDevice has two port forwarder, one to forward remote host port and another to forward remote device port. During an attach workflow, the port was forwarded by the latter. Update ProxiedDDS to make sure that it works in such case.
2024-03-19 21:36:06 +00:00
hangyu
2b317d584f
Add a minTileHeight
to ListTile widget so its height can be customized to less than the default height. ( #145244 )
...
fixes: https://github.com/flutter/flutter/issues/145369
2024-03-19 17:58:16 +00:00
Mitchell Goodwin
6190c5eea1
Widget state properties ( #142151 )
...
Fixes #138270 .
Moves the majority of the logic of MaterialStateProperties down to the widgets layer, then has the existing Material classes pull from the widgets versions.
2024-03-19 17:58:13 +00:00
goodmost
3236957f02
chore: fix some comments ( #145397 )
...
fix some comments
2024-03-19 17:00:24 +00:00
Bruno Leroux
6f61f6135f
Activate shortcuts based on NumLock state ( #145146 )
...
## Description
The PR updates `SingleActivator` in order to add a parameter for specifying that a shortcut depends on <kbd>NumLock</kbd> key state.
Somewhat similarly to what is possible with common modifiers expect that a boolean is not enough in this case because: by default, a shortcut should ignore the <kbd>NumLock</kbd> state and it should be possible to define shortcuts that require <kbd>NumLock</kbd> to be locked and other that require it to be unlocked.
@gspencergoog I considered defining a new `ShortcutActivator` implementation for this, but I thinks that adding the feature directly to `SingleActivator` results in a cleaner API.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/145144
Preparation for https://github.com/flutter/flutter/issues/144936
## Tests
Adds 3 tests.
2024-03-19 08:27:50 +00:00
Danny Tuppeny
89ef73e068
Roll pub packages + update DAP tests ( #145349 )
...
This manually rolls pub packages and updates some calls to use updated APIs that use `Uri` instead of file paths (since macro-generated sources don't exist as files on disk).
2024-03-18 21:39:21 +00:00
sanni prasad
993f554e4c
Fix for issue 140372 ( #144947 )
...
*Continuing work from the PR https://github.com/flutter/flutter/pull/140373 *
Add the ability to set route settings on PopupMenuButton
Fixes https://github.com/flutter/flutter/issues/140372
Added UTs as requested
2024-03-18 21:35:37 +00:00
LongCatIsLooong
98369bdd50
Introduce methods for computing the baseline location of a RenderBox without affecting the current layout ( #144655 )
...
Extracted from https://github.com/flutter/flutter/pull/138369
Introduces `RenderBox.{compute,get}DryBaseline` for computing the baseline location in `RenderBox.computeDryLayout`.
2024-03-18 21:32:22 +00:00
Bruno Leroux
50e7f2b84b
InputDecorator M3 tests migration - Step6 - constraints ( #145213 )
...
## Description
This PR migrates `InputDecorator.constraints` related tests to M3 and also various regression tests.
It is the fifth step for the M3 test migration for `InputDecorator`.
Step 1: https://github.com/flutter/flutter/pull/142981
Step 2: https://github.com/flutter/flutter/pull/143369
Step 3: https://github.com/flutter/flutter/pull/143520
Step 4: https://github.com/flutter/flutter/pull/144169
Step 5: https://github.com/flutter/flutter/pull/144932
## Related Issue
Related to https://github.com/flutter/flutter/issues/139076
@justinmc A somewhat small PR, I wanted to migrate the small group related to 'InputDecoration.constraints' (starting at line 2801), it adds a test checking min interactive height and two others that shows one way to bypass the standard min interactive height.
2024-03-18 12:53:14 +00:00
Taha Tesser
06ed849cbc
Update inherited_theme_test.dart
, ink_paint_test.dart
, ink_splash_test.dart
, opacity_test.dart
for Material 3 ( #144013 )
...
Updated unit tests for `Tooltip` to have M2 and M3 versions.
More info in #139076
2024-03-18 12:45:22 +00:00
Ian Hickson
c7123c96cd
Factor out use of "print" in flutter_goldens ( #144846 )
...
This is part 5 of a broken down version of the #140101 refactor.
This PR removes direct use of `print` and replaces it with a callback.
2024-03-17 01:56:19 +00:00
auto-submit[bot]
48c1c2313a
Reverts "Reland #128236 "Improve build output for all platforms" ( #143166 )" ( #145261 )
...
Reverts: flutter/flutter#143166
Initiated by: guidezpl
Reason for reverting: breaks devicelab windows tests
Original PR Author: guidezpl
Reviewed By: {loic-sharma}
This change reverts the following previous change:
Reland #128236 , reverted in https://github.com/flutter/flutter/pull/143125 .
This PR contains [one additional commit](199baea9a9
), fixing the 2 failed tests.
## Original description
Improves the build output:
1. Gives confirmation that the build succeeded, in green
1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open
1. Gives the size of the built executable (when the built executable is self contained)
### `apk`, `appbundle`
<img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d ">
<img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436 ">
### `macos`, `ios`, `ipa`
Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`.
<img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257 ">
<img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50 ">
<img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698 ">
### `windows`, `linux`, and `web`
Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below).
<img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b ">
<img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2 ">
<img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5 ">
### Size reporting
When applicable, the printed size matches the OS reported size.
- macOS
<img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce ">
- Windows
<img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7 ">
- Linux
<img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b ">
## Related issues
Part of #120127
Fixes https://github.com/flutter/flutter/issues/121401
2024-03-16 12:40:26 +00:00
Pierre-Louis
2fc76c7896
Reland #128236 "Improve build output for all platforms" ( #143166 )
...
Reland #128236 , reverted in https://github.com/flutter/flutter/pull/143125 .
This PR contains [one additional commit](199baea9a9
), fixing the 2 failed tests.
## Original description
Improves the build output:
1. Gives confirmation that the build succeeded, in green
1. Gives the path to the built executable, without a trailing period to make it slightly easier to cmd/ctrl+open
1. Gives the size of the built executable (when the built executable is self contained)
### `apk`, `appbundle`
<img width="607" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ecc52abe-cd2e-4116-b22a-8385ae3e980d ">
<img width="634" alt="image" src="https://github.com/flutter/flutter/assets/6655696/8af8bd33-c0bd-4215-9a06-9652ee019436 ">
### `macos`, `ios`, `ipa`
Build executables are self-contained and use a newly introduced `OperatingSystemUtils.getDirectorySize`.
<img width="514" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b5918a69-3959-4417-9205-4f501d185257 ">
<img width="581" alt="image" src="https://github.com/flutter/flutter/assets/6655696/d72fd420-18cf-4470-9e4b-b6ac10fbcd50 ">
<img width="616" alt="image" src="https://github.com/flutter/flutter/assets/6655696/5f235ce1-252a-4c13-898f-139f6c7bc698 ">
### `windows`, `linux`, and `web`
Build executables aren't self-contained, and folder size can sometimes overestimate distribution size, therefore their size isn't mentioned (see discussion below).
<img width="647" alt="image" src="https://github.com/flutter/flutter/assets/6655696/7179e771-1eb7-48f6-b770-975bc073437b ">
<img width="658" alt="image" src="https://github.com/flutter/flutter/assets/6655696/a6801cab-7b5a-4975-a406-f4c9fa44d7a2 ">
<img width="608" alt="image" src="https://github.com/flutter/flutter/assets/6655696/ee7c4125-a273-4a65-95d7-ab441edf8ac5 ">
### Size reporting
When applicable, the printed size matches the OS reported size.
- macOS
<img width="391" alt="image" src="https://github.com/flutter/flutter/assets/6655696/881cbfb1-d355-444b-ab44-c1a6343190ce ">
- Windows
<img width="338" alt="image" src="https://github.com/flutter/flutter/assets/6655696/3b806def-3d15-48a9-8a25-df200d6feef7 ">
- Linux
<img width="320" alt="image" src="https://github.com/flutter/flutter/assets/6655696/89a4aa3d-2148-4f3b-b231-f93a057fee2b ">
## Related issues
Part of #120127
Fixes https://github.com/flutter/flutter/issues/121401
2024-03-16 08:13:56 +00:00
Pierre-Louis
3109b1118e
Introduce Split
curve ( #143130 )
...
`Split` is a curve that progresses according to `beginCurve` until
`split`, then according to `endCurve`.
This curve is used with bottom sheets to allow linear finger dragging
and non-linear enter/exit animations. This PR cleans up a previously
private class I introduced and replaces it with the more customisable
`Split`.
Fixes https://github.com/flutter/flutter/issues/51627
Diagram to be added with
https://github.com/flutter/assets-for-api-docs/pull/239
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-16 09:08:00 +01:00
LongCatIsLooong
cc01701781
Use a separate TextPainter
for intrinsics calculation in RenderEditable
and RenderParagraph
( #144577 )
...
Use a dedicated `TextPainter` for intrinsic size calculation in `RenderEditable` and `RenderParagraph`.
This is an implementation detail so the change should be covered by existing tests. Performance wise this shouldn't be significantly slower since SkParagraph [caches the result of slower operations across different paragraphs](9c62e7b382/modules/skparagraph/src/ParagraphCache.cpp (L254-L272)
). Existing benchmarks should be able to catch potential regressions (??).
The reason for making this change is to make sure that intrinsic size computations don't destroy text layout artifacts, so I can expose the text layout as a stream of immutable `TextLayout` objects, to signify other render objects that text-layout-dependent-cache (such as caches for `getBoxesForRange` which can be relatively slow to compute) should be invalidated and `markNeedsPaint` needs to be called if the painting logic depended on text layout.
Without this change, the intrinsics/dry layout calculations will add additional events to the text layout stream, which violates the "dry"/non-destructive contract.
2024-03-16 01:15:19 +00:00
hangyu
58eb0e8ae6
Update a11y for SliverAppBar ( #144437 )
...
1. Set cacheExtent for sliverAppBar so it's not dropped from the
semantics tree.
2. Update its toolbarOpacity in a11y mode to 1.0. When scrolling in a11y
mode and the focus is back to the sliverAppBar, the content should be
visible.
fixes: https://github.com/flutter/flutter/issues/143437
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-03-15 10:42:02 -07:00
Loïc Sharma
8d54abfc22
Roll pub packages manually ( #145170 )
...
The automated roll failed as a test needs to be updated: https://github.com/flutter/flutter/pull/145167
Fixes: https://github.com/flutter/flutter/issues/139861
2024-03-15 14:12:22 +00:00
Nate
17a27358a6
Implementing switch expressions in flutter/test/
( #144580 )
...
Migrates test code to new `switch` syntax.
2024-03-14 14:20:44 -07:00
auto-submit[bot]
bc611f565b
Reverts "Fix TextField helper top padding on M3 ( #145087 )" ( #145168 )
...
Reverts: flutter/flutter#145087
Initiated by: Jasguerrero
Reason for reverting: failing on accessibility checks b/329548765
Original PR Author: bleroux
Reviewed By: {justinmc}
This change reverts the following previous change:
## Description
`InputDecorator` adds a 8.0 gap beetween the container and the helper text.
From the Material 3 specification, this gap should be 4.0.
See https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57 .
This PR sets the correct values for M3 without changing the value for M2.
| Before | After | M3 Spec |
|--------|--------|--------|
| ![image](https://github.com/flutter/flutter/assets/840911/9947f334-d98f-4f7e-9da7-ca6d5c0770ac ) | ![image](https://github.com/flutter/flutter/assets/840911/081dec4b-eb9f-4eee-a7dc-2538e7110ff0 )| ![image](https://github.com/flutter/flutter/assets/840911/c8c8f045-3b79-43a5-a1a3-cc6d5460644f ) |
If this change is accepted, a future step will be to make this value configurable, probably by `InputDecorationTheme`.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/144984
## Tests
Updates a value used by several existing tests.
2024-03-14 18:00:26 +00:00
LouiseHsu
9f5fd75e54
[framework] fix incorrect chinese localizations for Search Web and Share in selection controls ( #144857 )
...
Fixes https://github.com/flutter/flutter/issues/144825
Corresponding translation suggestions:
https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=7417055026368500447&language=zh-TW
(I accidentally pressed submit 3 times :( )
https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=7417055026368500447&language=zh-HK
https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=7417055026368500447&language=zh-CN
https://tc.corp.google.com/btviewer/edittranslation?project=Flutter&msgId=8883913494819754382&language=zh-CN
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
2024-03-14 10:14:20 -07:00
LongCatIsLooong
a69567a36f
Asserts if a TextPainter
gets disposed more than once ( #145124 )
...
The overflow indicator was sharing the same `TextPainter`.
2024-03-14 16:43:00 +00:00