Matan Lurey
64894be90a
Skip {PLAT}_web_tools_test#expression_evaluation_*_test.dart
, turning tree 🔴 ( #169305 )
...
P0 filed to restore: https://github.com/flutter/flutter/issues/169304 ,
these tests take 20m+ on Linux docs causing timeouts.
2025-05-22 20:08:01 +00:00
Matan Lurey
bb14ef665f
Update tool-internal generateLocalizations...()
to never use synthetic (flutter_gen
) packages ( #169285 )
...
Essentially this PR is
`s/getSyntheticGeneratedFileContent/getGeneratedFileContent` for a
particular test suite.
Made one non-test change (`bool useSyntheticPackage = false`) that
in-practice should be a NOP, mostly so I could catch (and remove) cases
where the default argument was already being passed-in. A follow-up PR
will continue to remove the synthetic package support features (and
refactor or remove tests where necessary).
2025-05-22 18:31:35 +00:00
Kevin Moore
cb3150f998
[tool] Add --no-minify flag to JS Compiler ( #169102 )
...
Also hides (behind verbose) dump info and frequency minify flags
2025-05-22 16:32:50 +00:00
Daco Harkes
534b250a56
[native assets] Graduate to preview ( #169194 )
...
This PR enables native assets on the main and dev channel by default,
and make native assets available on the beta channel.
This PR removes the flag from invocations.
The helper packages (`package:hooks` and `package:code_assets`) will
stay 0.x for now, until the SDK constraint can be bumped to a beta
release and we're happy with the Dart API.
Corresponding Dart CL:
https://dart-review.googlesource.com/c/sdk/+/429920
Issue:
* https://github.com/flutter/flutter/issues/129757
Project: https://github.com/orgs/dart-lang/projects/99/
2025-05-21 16:54:42 +00:00
Polina Cherkasova
61fe9b6b67
Unpin leak_tracker. ( #169079 )
...
Now, when leak_tracker bots are stable, leak_tracker can be unpinned.
2025-05-21 14:12:01 +00:00
Matan Lurey
5458f42782
Remove isExplicitPackageDependenciesEnabled: true
, it is the default. ( #169156 )
...
This flag has been enabled by default for quite some time in `master`,
and in the current `stable`.
This is the first of many PRs to get rid of the flag and the deprecated
code it is guarding.
2025-05-21 04:26:10 +00:00
flutter-pub-roller-bot
cf1004028c
Roll pub packages ( #169181 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2025-05-21 03:22:27 +00:00
Daco Harkes
899d6e9df6
[native assets] Roll dependencies ( #169073 )
...
Roll deps to the ones released today.
2025-05-20 20:14:16 +00:00
Kevin Moore
b3130ee78e
[flutter_tool] Remove unused environment flags in JS compiler ( #169097 )
...
Removes things left over from refactoring in
5a9fa1e7bf
2025-05-20 20:14:09 +00:00
Ben Konyi
df5f110325
Add support for hiding widget subtrees from the widget inspector ( #169007 )
...
This PR introduces two new widgets:
- `DisableWidgetInspectorScope`, which hides its children from the
widget inspector
- `EnableWidgetInspectorScope`, which makes its children available to
the widget inspector
These widgets are used to inform the `WidgetInspectorService`'s
`InspectorSerializationDelegate` when it should be omitting
`DiagnosticableNodes` from the response when building the root widget
tree for the inspector.
This functionality is meant to be used by developer tooling and packages
that want to prevent unnecessary implementation details from polluting
the inspector and possibly confusing end users.
This change also includes some minor updates to the Widget Preview
scaffolding template to hide the scaffold's implementation details and
only show details for the previews defined by the user.
Part of https://github.com/flutter/flutter/issues/166423
**Widget Previewer Demo**
<img width="1606" alt="image"
src="https://github.com/user-attachments/assets/eb23160e-01c5-413f-b1d2-97985ced9ef9 "
/>
2025-05-20 20:14:03 +00:00
Srujan Gaddam
fcfbe83be9
Fix DDC library bundle format test files to correctly pass flags ( #169095 )
...
Fixes a couple issues:
- Passes --web-experimental-hot-reload when library bundle format is
enabled.
- Passes chrome id only if chrome is enabled.
- Makes sure common code is run with VM and chrome.
## 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].
- [ ] 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-05-19 22:05:15 +00:00
Mohellebi abdessalem
ad5c849276
fix android studio lint about lambda argument ( #168901 )
...

## 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 followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
- [ ] 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].
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-19 18:08:03 +00:00
Sigurd Meldgaard
b23840d044
Only bundle assets and plugins from transitive closure of dependencies ( #160443 )
...
Fixes https://github.com/dart-lang/pub/issues/4486
Fixes https://github.com/dart-lang/pub/issues/4473
Fixes https://github.com/flutter/flutter/issues/79261
Fixes https://github.com/flutter/flutter/issues/160142
Fixes https://github.com/flutter/flutter/issues/155242
Use the new `.dart_tool/package_graph.json` file to compute the
dependency graph. Determining
* which are transitive dependencies of the main app's direct and
dev-dependencies, (not other packages from the workspace)
* which of these are only in the transitive set of the direct
dependencies
Bundles assets from dev_dependencies when running `flutter test`, but
not otherwise.
2025-05-19 15:30:58 +00:00
Victoria Ashworth
63f9060fb0
Make FlutterGeneratedPluginSwiftPackage an Xcode root package ( #168789 )
...
This PR makes the `FlutterGeneratedPluginSwiftPackage` swift package an
Xcode root package. A root package is one that is within the Xcode
project as a file reference. See image below:

This change makes it so that when the
`FlutterGeneratedPluginSwiftPackage` changes, if Xcode is also open,
Xcode will automatically re-resolve the package. This makes Xcode use
the new version instead of whatever it had cached.
Fixes https://github.com/flutter/flutter/issues/162399 and incremental
change towards https://github.com/flutter/flutter/issues/166489 .
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-19 15:27:33 +00:00
Parker Lougheed
99159bdcfa
[tool] Remove unused reportNullSafety
getter ( #168484 )
...
Removes the `FlutterCommand.reportNullSafety` getter and its overrides
as it's no longer used due to Flutter and the tool only supporting sound
null safety.
This PR is automatically test exempt due to only removing code.
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-17 01:21:26 +00:00
Ben Konyi
4baf4b4d1c
[ Widget Preview ] Refactor @Preview()
detection and code generation ( #168307 )
...
This change makes the detection of `@Preview(...)` annotations more
robust by converting the analyzer AST directly to generated code rather
than simply copying and pasting the original source. This allows for
proper handling of the following cases WRT import prefixing:
- The use of `const`
- String interpolation
- Other uses of constant variables in non-trivial contexts
- Etc.
2025-05-16 19:59:25 +00:00
Jessy Yameogo
b41c8e022b
Fix bug with debugging support code not getting injected on edge devices ( #168073 )
...
This PR addresses
[flutter/flutter#167102 ](https://github.com/flutter/flutter/issues/167102 ),
where debugging support code was not being properly injected when
running on Edge `flutter run -d edge`. The issue was due to missing
conditions in the injection logic that prevented the debugger service
from initializing correctly in this environment.
This change ensures that debugging support is consistently injected when
connected devices are present and the user has selected one of them.
fix https://github.com/flutter/flutter/issues/167102 .
2025-05-16 18:33:31 +00:00
Parker Lougheed
77ba015769
[tool] Fix broken comment references and code spans in doc comments ( #168498 )
...
Enables the `comment_references` and `unintended_html_in_doc_comment`
lints in `packages/flutter_tool`, then fixes each of the triggering
cases.
This PR is test exempt due to only affecting documentation comments.
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-15 21:14:26 +00:00
Ben Konyi
9a78af5eb0
Manual pub package roll ( #168916 )
2025-05-15 18:05:11 +00:00
Daco Harkes
3cb2f5f6a5
[native assets] Remove KernelSnapshot
dependency in build ( #168742 )
...
The link hooks (`hook/link.dart`) in Flutter have no access to the
resource identifier experiment for tree-shaking yet. That means we can
start running hooks earlier in the flutter build.
When we do get around to adding tree-shaking information, we should only
have a dependency on `KernelSnapshot` for AOT builds in which the Dart
tree-shaker runs. Likely achieved by splitting the `DartBuildForNative`
into two targets, one for Debug and one for Release. (Note, the names
for these targets are somewhat weird, so we should address that in
another PR as well. It should probably be called `RunDartHooks` or
something.)
I don't expect this PR to have any performance effect for fast hooks.
Other targets already run concurrently with this target:
```
$ flutter build -d macos --verbose
[ ] [ +278 ms] compile_macos_framework: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /Users/dacoharkes/flt/flutter/examples/hello_world/.dart_tool/flutter_build/ce2ba8b9e7204bce6beba11f20d6df36/app.dill,/Users/dacoharkes/flt/flutter/packages/flutter_tools/lib/src/build_system/targets/macos.dart,/Users/dacoharkes/flt/flutter/bin/cache/engine.stamp}
[...]
[ ] [ ] dart_build: Starting due to {}
[ ] [ +20 ms] No packages with native assets. Skipping native assets compilation.
[ ] [ +1 ms] dart_build: Complete
[ ] [ +1 ms] install_code_assets: Starting due to {}
[ ] [ +1 ms] Writing native assets json to file:///Users/dacoharkes/flt/flutter/examples/hello_world/.dart_tool/flutter_build/ce2ba8b9e7204bce6beba11f20d6df36/native_assets.json.
[ ] [ +1 ms] Writing /Users/dacoharkes/flt/flutter/examples/hello_world/.dart_tool/flutter_build/ce2ba8b9e7204bce6beba11f20d6df36/native_assets.json done.
[ ] [ ] install_code_assets: Complete
[ ] [+1376 ms] Building App.framework for x86_64...
[...]
[ ] [ +41 ms] compile_macos_framework: Complete
```
However, this PR makes the hooks already run concurrently with kernel
compilation, which always takes quite a while.
```
[ ] [ +2 ms] kernel_snapshot_program: Starting due to {}
[...]
[ ] [+2515 ms] release_unpack_macos: Complete
[ ] [+2425 ms] kernel_snapshot_program: Complete
```
This means that if the hooks do actual work, and enough cores on the
host are available for Dart compilation and hook execution, the result
will be quicker than before.
### Context
* https://github.com/dart-lang/native/issues/2236
### Testing
Existing native assets integration tests
### Benchmarks
Currently _not_ benchmarked. This will be benchmarked by the `flutter
build` and flutter-time-to-first-frame benchmarks once the experiment
flag is removed.
2025-05-15 05:17:23 +00:00
Srujan Gaddam
eb0712fd4c
Skip hot reload breakpoints test when running with web ( #168873 )
...
This worked before accidentally, presumably by using stale
source maps. Now that invocations in closures are transformed
by the compiler, the stale source maps are now invalid, leading
to timeouts in tests when running against the latest Dart SDK.
Skip this test instead until breakpoints work.
## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] 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].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
2025-05-15 04:11:17 +00:00
Mohellebi abdessalem
1d3a921df9
Replace hardcoded host and app level build.gradle paths with AndroidProject
-level getters in gradle_errors.dart
( #167949 )
...
this PR refactors the usage of :
-
`project.directory.childDirectory('android').childDirectory('app').childFile('build.gradle')`
to
`project.android.appGradleFile`
-
`project.directory.childDirectory('android').childFile('build.gradle')`
to `project.android.hostAppGradleFile`
to include the cases of usage of `build.gradle.kts` in new templates
which may may produce confusing errors to new devs
## 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 followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
- [x] I signed the [CLA].
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] 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].
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-13 23:56:25 +00:00
Kevin Moore
a1c4d99e4e
[tool] Fix deprecated API calls within tool ( #168200 )
...
Done by temporarily enabling the associated lints
2025-05-13 17:27:22 +00:00
Jessy Yameogo
8e8671bca5
Updated execution path to silently include --start-paused and updated tests ( #168400 )
...
This PR makes the following improvements to web hot reload support and
related tests:
- The `--start-paused` flag is now silently added when running with `-d
web-server --web-experimental-hot-reload` if it is not already present.
- Refactored test infrastructure to allow specifying the device
parameter (e.g., `'chrome'`, `'web-server'`) when running integration
tests.
- Added a new `web_run_web_server_test` to run flows on the web-server
device.
- Updated existing tests to explicitly pass the correct device parameter
where needed.
- We are currently not able to test hot reload on the web-server device
as this is not yet supported.
Fixes https://github.com/dart-lang/sdk/issues/60289
2025-05-13 16:47:49 +00:00
Victoria Ashworth
3315c123a5
Call xcode_backend.dart from macos_assemble.sh ( #168108 )
...
When iOS and macOS Flutter apps build, they use [Xcode Run
Scripts](https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build )
to call do various logic.
For iOS, the Run Scripts calls a bash file
([xcode_backend.sh](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.sh )),
which then calls a dart file
([xcode_backend.dart](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/xcode_backend.dart )).
`xcode_backend.dart` then calls `flutter assemble`.
For macOS, the Run Scripts calls a bash file
([macos_assemble.sh](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/bin/macos_assemble.sh )),
which then calls `flutter assemble` directly.
This PR changes `macos_assemble.sh` to call `xcode_backend.dart` like it
does for iOS so code can be shared between them and written in dart
instead of bash.
Fixes https://github.com/flutter/flutter/issues/168033 .
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-13 15:57:26 +00:00
Srujan Gaddam
2871340407
Add test for stack trace mapping and test expression eval tests using DDC library bundle format ( #168017 )
...
The bootstrap script utilizes a DDC utility function that maps paths to
their module name in order for the stack traces to show the Dart paths
and not the JS paths. This gets utilized in some stack tracing
functionalities like StackTrace.current. We should test that the mapping
is correct and we expect the correct stack traces.
These tests should be run with the DDC library bundle format as well, so
refactors them into shared code.
## 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].
- [ ] 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
----
Once we have the CL to emit inlined source maps for the DDC library
bundle format landed, we can fork this test and run it with that format
as well.
2025-05-12 17:53:07 +00:00
jesswrd
4ac6f4d711
Bumping Framework Default TargetSdk to 36 ( #168577 )
...
Bumped `targetsdk` to Android API 36 in a different PR in case we have
to rollback this change.
This is a part of bumping all necessary framework defaults for Android
API 36 [here](https://github.com/flutter/flutter/pull/166464 ).
Partially Addresses https://github.com/flutter/flutter/issues/163071
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-12 02:38:27 +00:00
Gray Mackall
d8571fda68
Remove old link for java gradle incompatibility ( #168561 )
...
We don't need this link anymore, and the current instructions already
tell users what to do.
Fixes https://github.com/flutter/website/issues/11530
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Co-authored-by: Gray Mackall <mackall@google.com>
2025-05-09 20:37:05 +00:00
flutter-pub-roller-bot
35bd0b1393
Roll pub packages ( #168509 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2025-05-08 00:50:25 +00:00
Matan Lurey
806057be59
Use config: enable-swift-...: false
, remove disable-swift-...: true
. ( #168433 )
...
This PR moves project-specific configuration from:
```yaml
flutter:
disable-swift-package-manager: true
```
to:
```yaml
flutter:
config:
enable-swift-package-manager: false
```
2025-05-07 18:28:22 +00:00
Kevin Moore
d80c390dc3
[tool] Refactor WebTemplate to be immutable ( #168201 )
...
This flows better. No uncertainty about calling the substitutions
function more than once, etc.
2025-05-06 03:28:25 +00:00
jesswrd
9cd0c083c7
Bumping framework Template Defaults to Android 16 (API 36) ( #166464 )
...
Updating framework to Android 16 (API 36). This involves updating
template versions to:
`compilesdk` 36
AGP 8.9.1
gradle 8.11.1
They are the recommended minimum versions outlined in the android docs
[here](https://developer.android.com/build/releases/gradle-plugin ).
Note: I will bump `targetsdk` in a different PR. Infra changes may be
necessary when bumping `targetsdk`, so rolling it back would be easier
if the change is in a separate PR.
Partially Addresses https://github.com/flutter/flutter/issues/163071
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-05 23:46:34 +00:00
Elliott Brooks
78a2a3fa67
[Widget Inspector] Add on-device button for changing default "tap" behavior ( #167677 )
...
Fixes https://github.com/flutter/flutter/issues/166118
Adds a second button to the on-device inspector that allows a developer
to temporarily disable the default "tap triggers widget selection"
behavior without fully exiting out of widget selection mode. Fixes an
issue where enabling/disabling widget selection is destructive for some
app set-ups, causing the developer's app to lose state.
## Demo

## Material screenshots
### Dark mode
<img width="130" alt="Screenshot 2025-04-23 at 12 22 41 PM"
src="https://github.com/user-attachments/assets/e643fd26-6bcb-43a2-a718-191e1831345f "
/>
<img width="113" alt="Screenshot 2025-04-23 at 12 22 48 PM"
src="https://github.com/user-attachments/assets/5ac81455-64f0-4f07-9b36-b8fd498a9669 "
/>
### Light mode
<img width="105" alt="Screenshot 2025-04-23 at 12 21 46 PM"
src="https://github.com/user-attachments/assets/49c67f6f-7d90-4758-83e9-ed8bf5505bae "
/>
<img width="108" alt="Screenshot 2025-04-23 at 12 21 55 PM"
src="https://github.com/user-attachments/assets/aeca0178-872d-441e-ae5f-e9b469d83d60 "
/>
## Cupertino screenshots
<img width="399" alt="Screenshot 2025-04-22 at 2 21 46 PM"
src="https://github.com/user-attachments/assets/0ad45cee-15cf-45af-9fa0-c0955296aa29 "
/>
### Dark mode
<img width="134" alt="Screenshot 2025-04-23 at 12 20 19 PM"
src="https://github.com/user-attachments/assets/9b34a6c2-5308-465e-b842-0fb180d25865 "
/>
<img width="123" alt="Screenshot 2025-04-23 at 12 20 26 PM"
src="https://github.com/user-attachments/assets/7c601831-91c8-440e-98ae-070444574ff9 "
/>
### Light mode
<img width="106" alt="Screenshot 2025-04-22 at 2 21 38 PM"
src="https://github.com/user-attachments/assets/517839d5-25d8-42e7-a9b9-f35a77725afc "
/>
<img width="103" alt="Screenshot 2025-04-22 at 2 21 55 PM"
src="https://github.com/user-attachments/assets/390f0b0f-1a9b-4880-b686-fabe102fe7b6 "
/>
2025-05-05 19:58:23 +00:00
Gray Mackall
ce4aae7fad
Change FGP unit test expect
to match on process result instead of exit code ( #168278 )
...
Change FGP unit test `expect` to match on process result instead of exit
code. Should give actionable logs on failure.
## 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].
- [ ] 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Co-authored-by: Gray Mackall <mackall@google.com>
2025-05-05 17:08:14 +00:00
Ben Konyi
3d0c18b550
[ Widget Preview ] Add typedefs, replace height
and width
with size
( #168063 )
...
Addresses some comments from
[flutter.dev/go/widget-previews-architecture](flutter.dev/go/widget-previews-architecture).
2025-05-05 15:51:14 +00:00
Victoria Ashworth
071f62d937
Add engine build mode to Flutter and FlutterMacOS framework Info.plist ( #168024 )
...
This PR adds the build mode (debug, profile, release) to the
Flutter.framework, FlutterMacOS.framework, and FlutterEmbedder.framework
Info.plist.
It also adds the engine version to the FlutterMacOS.framework
Info.plist. The engine version is already in the Flutter.framework one.
Fixes https://github.com/flutter/flutter/issues/168028 .
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-02 20:39:50 +00:00
Victoria Ashworth
59537e1f66
Add link to SwiftPM manual integration instructions ( #168066 )
...
If SwiftPM integration fails, display a link to instructions on how to
integrate manually.
New error message will look like
```
An error occurred when adding Swift Package Manager integration:
Exception: Forced a throw
Swift Package Manager is currently an experimental feature, please file a bug at
https://github.com/flutter/flutter/issues/new?template=01_activation.yml
Consider including a copy of the following files in your bug report:
ios/Runner.xcodeproj/project.pbxproj
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (or the scheme for the flavor used)
To add Swift Package Manager integration manually, please use the following instructions:
https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers#add-to-a-flutter-app-manually
Alternatively, to avoid this failure, disable Flutter Swift Package Manager integration for the project
by adding the following in the project's pubspec.yaml under the "flutter" section:
"disable-swift-package-manager: true"
Or disable Flutter Swift Package Manager integration globally with the
following command:
"flutter config --no-enable-swift-package-manager"
```
Fixes https://github.com/flutter/flutter/issues/160214 .
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-02 20:39:50 +00:00
Matt Boetger
fe1952ad78
Add metrics for android gradle plugin version ( #168181 )
...
Add android gradle plugin version to any events logging gradle builds.
Fixes : #164148
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
2025-05-02 20:02:15 +00:00
Kevin Moore
6ce1251e75
Omit service worker settings when service worker is disabled ( #168192 )
...
Omit the `serviceWorkerVersion` when the feature disabled, specifically
when `--pwa-strategy none`
2025-05-02 19:30:21 +00:00
Ben Konyi
e3db1bb721
[ Widget Preview ] Improve widget inspector support for widget previews ( #168013 )
...
In order to prevent the widget inspector from being able to select and
inspect elements of the widget previewer's scaffolding, this commit
consists of two notable changes:
1) A `debugWillManuallyInjectWidgetInspector` property has been added to
`WidgetsBinding`. Setting this property to true before running the
application will prevent `WidgetsApp` from injecting a `WidgetInspector`
instance into the widget tree, even if the widget inspector is enabled.
This means that the widget inspector will not be able to select and
highlight widgets by default, requiring `WidgetInspector` to be manually
wrapped around widget trees that should be inspectable.
2) The widget_preview_scaffold template has been updated to set
`debugWillManuallyInjectWidgetInspector` to true by default, and to wrap
individual previews provided by the developer with an instance of
`WidgetInspector` to restrict widget inspection to the contents of the
preview.
This change also includes a minor bug fix for situations where
`WidgetInspector` is inserted into an unconstrained context. Previously,
the `WidgetInspector`'s `_InspectorOverlay` would attempt to take up as
much space as possible, causing an overflow. To fix this, the
`_InspectorOverlay` is wrapped with `Positioned.fill(...)` to force it
to take on the same size as its parent `Stack`.
Work towards https://github.com/flutter/flutter/issues/166423
**Demo:**
https://github.com/user-attachments/assets/6d9d384c-5470-4828-983d-a6d9051a2282
2025-05-02 19:28:17 +00:00
Victoria Ashworth
07b0983657
Share common logic between UnpackMacOS and UnpackIOS build targets ( #168034 )
...
`UnpackIOS` and `UnpackMacOS` have shared logic, which is currently
basically duplicate code. We also plan to add more shared logic for
SwiftPM. To simply that, this PR creates an abstract `UnpackDarwin`
class with the shared logic.
No functionality is changed other than slightly changed error logs for
`UnpackMacOS`. Code is tested by:
-
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart
-
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/general.shard/build_system/targets/macos_test.dart
Fixes https://github.com/flutter/flutter/issues/168029 .
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-02 16:09:41 +00:00
Daco Harkes
48f87a5fe7
[native assets] Roll dependencies ( #168139 )
...
Roll packages to the ones published today.
Note that `native_assets_cli` was split up into `hooks` and
`code_assets`, and `native_assets_builder` was renamed to
`hooks_runner`.
2025-05-02 08:19:21 +00:00
Chris Bracken
2e9b38d54a
Migrate SPM OS minimums to iOS 13, macOS 10.15 ( #168153 )
...
iOS deployment target was migrated from 12 to 13 in:
* https://github.com/flutter/flutter/pull/167737
macOS deployment target was migrated from 10.14 to 10.15 in:
* https://github.com/flutter/flutter/pull/168101
Issue: https://github.com/flutter/flutter/issues/167735
Issue: https://github.com/flutter/flutter/issues/167745
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-01 16:59:26 +00:00
flutter-pub-roller-bot
651ff0a8f2
Roll pub packages ( #168119 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
2025-05-01 04:42:56 +00:00
Chris Bracken
4c5d0de983
macOS: Update minimum macOS version to 10.15 ( #168101 )
...
This updates the Flutter minimum macOS version from 10.14 to 10.15 adds
a migrator for existing apps, and updates our own examples, tests, and
benchmark apps to 10.15. A follow-up patch will drop macOS 10.15
`@available` checks in the embedder.
This is required in order to use Swift in the embedder and not need to
bundle the Swift runtime libs in every app that uses Flutter. Swift
stable ABI was introduced in macOS 10.14.4.
As of March 2025, usage of macOS 10.14 is approximately 1.2~1.8%
depending on source of statistics, see example public usage data here:
https://gs.statcounter.com/macos-version-market-share/desktop/worldwide
This patch makes the following changes:
1. Updates mac_deployment_target from 12.0 to 13.0.
2. Changes templates to `MACOSX_DEPLOYMENT_TARGET`, `MinimumOSVersion`,
and Podfile `platform :osx` to 10.15.
3. Adds migrator for Podfile part to migrate `platform :osx, '10.14'` ->
`platform :osx, '10.15'`
4. Compiles with `-mmacosx-version-min=10.15`
5. Runs the migrator on all example apps and integration tests.
6. Updates examples, tests to macOS 10.15 deployment target
Issue: https://github.com/flutter/flutter/issues/167745
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-05-01 04:02:25 +00:00
August
45f431fde9
feat: Arbitrary format options for localizations generation ( #102983 ) ( #167029 )
...
Migration of Localization Generation [Option
1](https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source#migration-guide )
breaks `dart format . --set-exit-if-changed` checks (as commonly used in
pipelines), as the generated file does not comply the `dart format`
rules.
This PR:
- Formats the generated localization files by default
- In contrast to [this
comment](https://github.com/flutter/flutter/pull/109171#issuecomment-1209710029 )
I don't see it as breaking as the files are generated dynamically on
every change and there's no need in migrating them. Also any tests
should not fail as either the format was done manually afterwards
anyways, or the formatting was not checked at all (in third party apps /
libraries) as the output had not a correct format in any use case of
checking via `dart format`.
- Add tests for `no-format`
- Add option to add arbitrary arguments to the `dart format` command to
allow customized formatting
Closes #167982
Contributes to:
https://github.com/flutter/flutter/issues/102983#issuecomment-2707419112
*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-30 02:56:28 +00:00
Loïc Sharma
7141eb3bdc
[tool] Add a telemetry event to track SwiftPM migration ( #166773 )
...
Flutter is migrating from CocoaPods to Swift Package Manager to manage
native dependencies on iOS and macOS. We'd like to answer the following
questions:
1. Can we remove CocoaPods support from Flutter's tooling?
2. Can we tell plugin authors that they can remove CocoaPods integration
from their plugins?
This makes the Flutter tool send an event when it injects plugins into
an iOS or macOS project. This will happen whenever a user does commands
like `flutter build ios`, `flutter build macos`, and more.
Part of https://github.com/flutter/flutter/issues/147602
Depends on: https://github.com/dart-lang/tools/pull/2062
## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-29 19:11:50 +00:00
Daco Harkes
04616f8dde
[native assets] Roll dependencies ( #167984 )
...
Roll forward dependencies to the ones published today.
2025-04-29 13:29:16 +00:00
Matan Lurey
f7d7633f54
Fix late
variable non-assignment when WASM is enabled ( #167954 )
...
Closes https://github.com/flutter/flutter/issues/167887 .
Appears to be a regression as of
https://github.com/flutter/flutter/issues/165006 . Might be worth CPing?
2025-04-29 00:34:26 +00:00
Matan Lurey
f94a82d2e4
Add flutter: config: {...}
section to pubspec.yaml
to influence FeatureFlags
( #167953 )
...
Closes https://github.com/flutter/flutter/issues/167667 .
In this PR:
- `FlutterFeaturesConfig` reads from the global config, current
pubspec.yaml, and environment
- `FeatureFlags` now delegates "was this configured" to
`FlutterFeaturesConfig`
- `featureFlags` (`Context`) now is created with knowledge of the
current `pubpec.yaml`, if any
Once this lands and we play with it a bit (i.e. migrate
`disable-swift-package-manager`), we can publicize it and update website
documentation (it won't make it into this beta/stable release anyway).
I did a significant rewrite of `feature_test`, as lots of what was being
tested no longer made sense.
2025-04-28 23:59:21 +00:00