This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/159729
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
https://github.com/flutter/flutter/issues/159729: Warning in logs after a fresh flutter module create when building an aar for android.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Warning after flutter create of a module.
### Workaround:
Is there a workaround for this issue?
Manual migration after flutter create.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
create module then build as app or aar then look in logs for warnings about gradle imperative apply
This pull request reverts the changes in #155757.
The auto-formatter created conflicts in the master branch, so the revert was performed manually in #160643.
For this cherry-pick PR, I was able to run `git revert 21381d843f3feb32640ae385aedd8e5c4003696b` without any problems.
<br>
### Issue Links
bug reports: #160196, #160555
cherry-pick request: #161176
### Target
stable
### Changelog Description
Passing a list literal to a `DropdownMenu` causes the widget to reset to the `initialSelection` after each build.
### Impacted Users
This affects anyone using the [DropdownMenu](https://api.flutter.dev/flutter/material/DropdownMenu-class.html) widget.
### Impact Description
The impact usually consists of the text value being inconveniently reset each time the widget is rebuilt. (In some cases it can be a fatal crash: the code sample from #160196 shows how this change can lead to an infinite build loop.)
### Workaround
This regression can be mitigated by caching & modifying a single list instance, rather than using a list literal for the `DropdownMenu` constructor.
### Risk
low
### Test Coverage
yes
### Validation Steps
#160643 added a regression test for this revert.
The fix can also be verified by running the code sample from #160196 and verifying that there is no infinite build loop.
This pull request is created by [automatic cherry pick
workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate
this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/157543
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter
developers. See [best
practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md)
for examples
Add deprecation notice for Android x86 support, which will be removed in
next stable release after 3.27.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot
ship an iOS app)? Does it impact development (ex. flutter doctor crashes
when Android Studio is installed), or the shipping production app (the
app crashes on launch)
A deprecation notice will be printed when users build or run an x86
Android application.
### Workaround:
Is there a workaround for this issue?
No, this is simply a deprecation notice.
### Risk:
What is the risk level of this cherry-pick?
- [X] Low
- [ ] Medium
- [ ] High
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [X] Yes
- [ ] No
### Validation Steps:
What are the steps to validate that this fix works?
Run `flutter build apk --target-platform=android-x86` and observe a
deprecation notice is printed.
Co-authored-by: Ben Konyi <bkonyi@google.com>
This pull request is created by [automatic cherry pick
workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate
this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/150131
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter
developers. See [best
practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md)
for examples
Suggest macOS Sequoia Local Network permissions instead of CLI tool
SocketException crash.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot
ship an iOS app)? Does it impact development (ex. flutter doctor crashes
when Android Studio is installed), or the shipping production app (the
app crashes on launch)
The app fatally crashes on `flutter run ios` with a non-actionable
error.
### Workaround:
Is there a workaround for this issue?
The potential workarounds are listed in the error message added by this
PR.
### Risk:
What is the risk level of this cherry-pick?
- [x] Low
- [ ] Medium
- [ ] High
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [x] Yes
- [ ] No
### Validation Steps:
What are the steps to validate that this fix works?
It's hard to validate this PR because the original issue is hard to
reproduce, but you can manually add a socket exception here
4b818b56c2/packages/flutter_tools/lib/src/mdns_discovery.dart (L235-L239)
and `flutter run ios`, and inspect the output.
Co-authored-by: LouiseHsu <louisehsu@google.com>
This pull request is created by [automatic cherry pick
workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate
this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/157916 and
https://github.com/flutter/flutter/issues/158924
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter
developers. See [best
practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md)
for examples
Restore the previous dropdown menu positioning logic.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot
ship an iOS app)? Does it impact development (ex. flutter doctor crashes
when Android Studio is installed), or the shipping production app (the
app crashes on launch)
DropdownMenu menu is misplaced and can be fully or partially hidden.
See
https://github.com/flutter/flutter/pull/158930#issuecomment-2492120497
for more context.
### Workaround:
Is there a workaround for this issue?
No
### Risk:
What is the risk level of this cherry-pick?
- [x] Low
- [ ] Medium
- [ ] High
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [x] Yes
- [ ] No
### Validation Steps:
What are the steps to validate that this fix works?
< Replace with validation steps here >
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
This pull request is created by [automatic cherry pick
workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate
this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/158537
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter
developers. See [best
practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md)
for examples
Avoid rethrowing `DartDevelopmentServiceException`s as `StateError`s
when the Dart Development Service fails to start due to the target
shutting down.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot
ship an iOS app)? Does it impact development (ex. flutter doctor crashes
when Android Studio is installed), or the shipping production app (the
app crashes on launch)
Currently one of the top tool crashers on the beta branch. The crash is
harmless and shouldn't impact user workflows, but causes significant
noise.
### Workaround:
Is there a workaround for this issue?
No workaround available.
### Risk:
What is the risk level of this cherry-pick?
- [x] Low
- [ ] Medium
- [ ] High
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [x] Yes
- [ ] No
### Validation Steps:
What are the steps to validate that this fix works?
Hard to replicate the original issue consistently, but in theory: start
applications and immediately shut them down before DDS can finish
starting.
Co-authored-by: Ben Konyi <bkonyi@google.com>
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
Part of https://github.com/flutter/flutter/issues/156111
### Changelog Description:
Updates the Android plugin templates to use newer configurations that have better compatibility with recent versions of AGP.
### Impact Description:
Without this, plugins created by `flutter create` will have deprecation warnings out of the box for developers whose projects use new versions of AGP, and will eventually fail to compile without manual updates.
### Workaround:
Manually change the Java version after running `flutter create`
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
1. `flutter create -t plugin some_plugin --platforms=android`
2. Update the example project to the latest version of AGP
3. Build
There should not be warnings about `source value 8 is obsolete` or `target value 8 is obsolete`.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/157359
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Prevents `flutter build ios-framework --xcframework` from copying an extraneous Flutter.xcframework.dSYM into the App.framework folder
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Previously, `flutter build ios-framework --xcframework` would fail with
`error: Multiple commands produce '......./BuildProductsPath/Release-iphoneos/Flutter.framework.dSYM/Contents'`.
Is there a workaround for this issue?
The workaround is to delete `App.xcframework/ios-arm64/dSYMs/Flutter.framework.dSYM`.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Try to build any example app with `flutter build ios-framework --xcframework`, then inspect the App.framework folder. It should only include `App.framework.dSYM`, and not `Flutter.xcframework.dSYM `
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
This allows host Android apps using Kotlin Gradle files to depend on a Flutter module as source, see
https://docs.flutter.dev/add-to-app/android/project-setup#add-the-flutter-module-as-a-dependency.
Previously they wouldn't be able to, because we expected the host app to use `setBinding` in it's Gradle files, which is Groovy syntax that doesn't have a parallel in the Kotlin Gradle DSL. They could still depend on a flutter module if built as an aar.
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Allows host Android apps using Kotlin Gradle files to include a Flutter module.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Without this change, Android apps using Kotlin Gradle files are unable to depend on a Flutter module as source (they would still be able to as an aar).
### Workaround:
Is there a workaround for this issue?
Build the flutter module as an aar.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Create a new Android app (probably in Android studio).
Create a Flutter module (`flutter create foobar --template=module`).
Apply [this diff](1f1e92ac79), matching names to your specific case, to the Android app.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/156304
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Provides guidance on how to fix a common error encountered when using Java 21 and Android Gradle Plugin versions less than 8.2.1, a combination that many users are encountering due to a recent Android Studio upgrade.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
Flutter apps fail to build on Android when using the previously mentioned combination (Java 21/AGP < 8.2.1). This error handler guides users on fixing the problem.
### Workaround:
Is there a workaround for this issue?
Users can upgrade their AGP version, or specify a lower Java version. But they would be unlikely to know this, because the (unhandled) error message is not helpful for Flutter developers.
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
Try building an app with the mentioned combination, verify that the handler triggers (i.e., the message includes `flutter fix...`
The PrivacyInfo.xcprivacy file was originally copied to the top-level macOS framework, but instead needs to be in the Resources directory (which is a different path than iOS). This caused codesigning issues https://github.com/flutter/flutter/issues/157016.
The path is being corrected https://github.com/flutter/engine/pull/55938 so update the framework test to handle either path. It will be updated to just check the correct path once it rolls into the framework.
Reverts: flutter/flutter#156440
Initiated by: zanderso
Reason for reverting: Failing in post submit with
```
[2024-10-08 18:00:22.743647] [STDOUT] stdout: [!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
[2024-10-08 18:00:22.743695] [STDOUT] stdout: In Podfile:
[2024-10-08 18:00:22.743718] [STDOUT] stdout: google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved t
Original PR Author: flutter-pub-roller-bot
Reviewed By: {fluttergithubbot}
This change reverts the following previous change:
This PR was generated by `flutter update-packages --force-upgrade`.
Following https://github.com/flutter/flutter/pull/155476, this PR is to normalize `ThemeData.tabBarTheme`; change the `TabBarTheme tabBarTheme` property to `TabBarThemeData tabBarTheme` in `ThemeData`. In `ThemeData()` and `ThemeData.copyWith()`, the `tabBarTheme` parameter type is changed to `Object?` to accept both `TabBarTheme` and `TabBarThemeData` so that we won't cause immediate breaking change and make sure rolling is smooth. Once all component themes are normalized, these `Object?` types should be changed to `xxxThemeData`.
There's no way to create a dart fix because we can't add a "@deprecated" label for TabBarTheme; TabBarTheme is a new InheritedWidget subclass now.
Addresses the "theme normalization" sub project within https://github.com/flutter/flutter/issues/91772
## Add `bySemanticsIdentifier` finder for finding by identifier
### Description
This pull request introduces a new finder, `CommonFinders.bySemanticsIdentifier`, to the Flutter testing framework. This finder allows developers to locate `Semantics` widgets based on their `identifier` property, enhancing the precision and flexibility of widget tests.
### Motivation
Establish a consistent and reliable method for locating elements in integration and end-to-end (e2e) tests. Unlike `label` or `key`, which may carry functional significance within the application, the `identifier` is purely declarative and does not impact functionality. Utilizing the `identifier` for finding semantics widgets ensures that tests can target specific elements without interfering with the app's behavior, thereby enhancing test reliability, maintainability, and reusability across testing frameworks.
### Changes
- **semantics.dart**
- Updated documentation to mention that `identifier` can be matched using `CommonFinders.bySemanticsIdentifier`.
- **finders.dart**
- Added the `bySemanticsIdentifier` method to `CommonFinders`.
- Supports both exact string matches and regular expression patterns.
- Includes error handling to ensure semantics are enabled during tests.
- **finders_test.dart**
- Added tests to verify that `bySemanticsIdentifier` correctly finds widgets by exact identifier and regex patterns.
- Ensures that the finder behaves as expected when semantics are not enabled.
### Usage
Developers can use the new finder in their tests as follows:
```dart
// Exact match
expect(find.bySemanticsIdentifier('Back'), findsOneWidget);
// Regular expression match
expect(find.bySemanticsIdentifier(RegExp(r'^item-')), findsNWidgets(2));
```
Keyboard navigation in `DropdownMenu` depends on `focus` instead of platforms.
Updating tests to remove `variant: TargetPlatformVariant.desktop()` from keyboard navigation tests.
NavigatorPopHandler now includes the return value from Route. Recently some navigation infrastructure was updated to support passing through these return values, but NavigatorPopHandler was missed until now.
Migrates existing instantions of `--template plugin_ffi` to deal with Android 15 16kb memory pages.
Issue:
* https://github.com/flutter/flutter/issues/155933
@reidbaker I could only find migrations that run from the root application. However the file needing to be migrated is a plugin. The plugin is being referenced from the example in the example dir and that's where the migrator is run, so I wrote the code so that it walks up to find the plugin. Do you know of a way to run migrators to non-root projects? (Can we even safely do so, e.g. the non-root could be in the pub cache, could be a different project on the users' system etc. So maybe checking if we are in the examples dir is the only sane thing to do?)
Tests:
* Added unit tests in `test/general.shard/android/migrations/cmake_android_16k_pages_migration_test.dart`