# Flutter stable 3.24.0 Framework
## Scheduled Cherrypicks
[flutter/153949](https://github.com/flutter/flutter/issues/153949): Fix a crash when deleting text inside CupertinoPageRoute, with a CJK (chinese, japanese, korean) keyboard on Android.
[flutter/153939](https://github.com/flutter/flutter/issues/153939): Fixes an issue where Flutter TextField may stop accepting input on iOS.
[flutter/152420](https://github.com/flutter/flutter/issues/152420): Fixes scrolling jank when a SelectionArea/SelectableRegion is used as a child of a Scrollable like ListView or PageView on Android and iOS.
[flutter/154199](https://github.com/flutter/flutter/pull/154199): Removes log spam when building a freshly created template app for Android.
[flutter/153967](https://github.com/flutter/flutter/pull/153967): Fixes macOS host build failure when there are no native asset frameworks to codesign. Impacts users who have enabled experimental native assets feature.
[flutter/153769](https://github.com/flutter/flutter/pull/153769): When running a Flutter app, display a concise error message when connection to the device is lost.
[flutter/154270](https://github.com/flutter/flutter/pull/154270): Prevent preemptive gradle crash for android builds that would fail to build anyway but with a confusing error message.
[flutter/54735](https://github.com/flutter/engine/pull/54735): When semantics are enabled on Web, the onTap of various widgets (GestureDetector, InkWell) are called twice or the callback from one widget is called when another widget is pressed.
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/153668. Original PR at https://github.com/flutter/flutter/pull/154121.
### 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
Fixes a tool crash case when building 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)
Causes a crash when building for Android in some cases.
### Workaround:
Is there a workaround for this issue?
Build with the `--android-skip-build-dependency-validation` flag.
### 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?
< Replace with validation steps here >
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/153885#issue-2479189666
### 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
Upgrades template Gradle, App AGP, and Kotlin versions.
### 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)
Fixes some log spam when building a freshly created template app for Android.
### Workaround:
Is there a workaround for this issue?
Yes, just upgrade the output of the template manually.
### 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?
`flutter create foo`, `cd foo`, `flutter build apk`
Fixes an issue where Flutter TextField may crash on iOS after a horizontal drag that does not meet the drag threshold to win the gesture arena, leaving the TextField in a weird state that does not accept tap gestures.
Fixes#153939
Cherry-pick of: https://github.com/flutter/flutter/issues/151989
Related issue: #153458
Fix a crash when deleting text in an EditableText inside CupertinoPageRoute, with a CJK keyboard on Android. CJK Keyboards on Android may send a key event instead of directly updating the text through the IME, in that case we do not hide the toolbar when text is deleted. This causes an exception when in scrollable text, because the context menu scroll listener tries to access the `RenderBox.size` while in a weird state. This change fixes that and hides the toolbar when text is deleted through a key event.
Fixes#153949
Cherry-pick of: #153822
Related issue: #153003
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/153471
### 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
[CLI] When running a Flutter app, a noisy crash message is displayed when the connection to the device is lost.
### 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)
When running an app (e.g. using `flutter run`) and the connection to the device is lost (e.g. user shutdown the device), a noisy crash message is displayed instead of showing something concise and useful such as "Lost connection to device."
### Workaround:
Is there a workaround for this issue?
Not necessary. Most users will be able to rerun their app without problems.
### 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?
N/A. No repro is known.
### Issue Link:
https://github.com/flutter/flutter/issues/153842
(also duplicate https://github.com/flutter/flutter/issues/153268)
### Changelog Description:
Fixes macOS host build failure when there are no native asset frameworks to codesign
### Impact Description:
macOS apps may fail to build with the error: `*.framework: No such file or directory`.
### Workaround:
1. Use the the master or beta (3.25.0-0.1.pre) channels.
2. Some users report `flutter clean` temporarily unwedged them.
### 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:
From PR https://github.com/flutter/flutter/pull/150742
To reproduce this build failure:
1. Enable native assets in the Flutter tool: `flutter config --enable-native-assets`
2. Create a Flutter project with the default template: `flutter create test_native_assets`
3. Add a build hook that does nothing (`hook/build.dart`).
4. Try to build/run the app: `flutter run --debug -d macos`
Expect the build to succeed.
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/153298
### 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
[CLI tool] When unable to connect to Chrome/Chromium when running a flutter web app, gracefully exit with an error message instead of crashing.
### 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)
Impacts users locally running Flutter web apps.
Users are likely getting noisy crashes when `flutter run` or `flutter debug-adapter` are unable to connect to the flutter web app (perhaps due to a firewall or the user closing the browser before the connection can be made).
### Workaround:
Is there a workaround for this issue?
N/A. No repro is known.
### 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?
N/A. No repro is known.
Context: https://github.com/flutter/flutter/issues/153472.
When the Flutter VM service is disposed while there are still outstanding requests, each request is completed with an `RPCError` that has no stack trace. This was fixed in package:vm_service v14.2.5 (these errors will now have stack traces). This PR bumps the framework repo's dependency on this package from 14.2.4 to 14.2.5. This may be handy in case we miss handling these errors from specific call sites in whatever fix(es) we put out for https://github.com/flutter/flutter/issues/153472.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
https://github.com/flutter/flutter/issues/116493
Dependent on engine-side CP https://github.com/flutter/engine/pull/54513
### Changelog Description:
Flutter now bundles iOS framework debugging symbols in app archives built with `flutter build ipa` or Xcode's *Product > Archive* command. This eliminates the need for manual download/bundling of Flutter debug symbols for release build crash log symbolication, and as of Xcode 16, these symbols are now required for app archives to pass App Store validation.
### Impact Description:
Without these bundled symbols, iOS App Store validation fails for Flutter apps under Xcode 16, making it impossible for developers to publish to the iOS App Store.
### Workaround:
Use Xcode 15.
### Risk:
What is the risk level of this cherry-pick?
The change itself is quite simple and in the case where we can't find a bundled Flutter.framework.dSYM inside the flutter tool's artifact cache, we simply fall back to the previous behaviour of not copying it.
In the case where the Flutter.framework.dSYM is found in the artifact cache (which is the expected case), we simply perform a copy using `rsync` as we do with Flutter.framework itself. This is also relatively low-risk.
Further, this change has been verified by @cbracken using Flutter's own organisation on the App Store, and by [a non-Google developer](https://github.com/flutter/flutter/issues/116493#issuecomment-2282226089).
However, I'm flagging as medium-risk since this change has only had two days of bake time for us to collect feedback, and while I expect there's a very low likelihood of an issue, we haven't yet got sufficient feedback to say definitively that we haven't missed any edge-cases.
### 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?
The developer performing these steps will need to have *App Manager* permissions for their development team in App Store Connect.
1. Install Xcode 16 beta.
2. Make Xcode 16 beta the default on your machine: `xcode-select -s /Applications/Xcode-beta.app`
3. Create the default clickcounter app: `flutter create clickcounter`
4. Open `ios/Runner.xcworkspace` in Xcode beta 16.
5. In the project explorer sidebar, select the *Runner* app, then select the *Signing & Capabilities* tab.
6. Set the bundle identifier to the bundle identifier of your app as configured in App Store Connect.
7. From the team dropdown, select a team for which you have developer permissions.
8. From the menu bar, select *Product > Archive*. This will open the Organizer window. You can open it again later from the *Window* menu or via Command-Option-Shift-O.
9. Select the archive, then click *Validate App.*
Cherry-pick request: https://github.com/flutter/flutter/issues/153308
Original CL:
This will make
* `flutter run` have source maps enabled by default
* `flutter build` have source maps disabled by default
which mirrors what happens already today with the js compilers.
For local development this works quite well - even better than with dart2js (see dart2js issues in [0]).
We do have some follow-up items for source maps in dart2wasm compiler, see [1]
[0] [flutter/flutter/issues/151641](https://github.com/flutter/flutter/issues/151641)
[1] [dart-lang/sdk/issues/56232](https://github.com/dart-lang/sdk/issues/56232)
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?
### 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
Prevent CLI tool crash that can occur when unable to exit a spawned Chromium instance that's already been exited.
### 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)
Noisy crashes for users. This crash represents 65.69% of tool crashes (with roughly half of that percentage of clients being affected).
### Workaround:
Is there a workaround for this issue?
There is no known workaround.
### Risk:
What is the risk level of this cherry-pick?
This simply adds a try-catch that will, at worst, obscure errors.
### 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?
N/A. No reliable repro is known at this time.
### Issue Link:
https://github.com/flutter/flutter/issues/152989
### Changelog Description:
On Xcode 16 beta, compilation errors are not displayed in the output of `flutter run`.
### Impact Description:
If there are compilation errors `flutter build ios`/`run` will fail, but displays the last x lines out the Xcode output instead of a nicely formatted description of the error.
### Workaround:
Use Xcode 15.
### 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:
Run the following steps with both Xcode 15 and Xcode 16 installed (should behave the same):
```
$ flutter create test_create
$ cd test_create
$ open ios/Runner/AppDelegate.swift
```
Add code that would cause a compilation issue:
```swift
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
var i = 1 + @""
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
```
```
$ flutter build ios
```
Output should be:
```
Failed to build iOS app
Swift Compiler Error (Xcode): String literals in Swift are not preceded by an '@' sign
/Users/m/Projects/test_create/ios/Runner/AppDelegate.swift:9:16
Swift Compiler Error (Xcode): Binary operator '+' cannot be applied to operands of type 'Int' and 'String'
/Users/m/Projects/test_create/ios/Runner/AppDelegate.swift:9:14
Encountered error while building for device.
```
### Issue Link:
https://github.com/flutter/flutter/issues/151553
### Changelog Description:
Make a flutter_tools test pass on Xcode 16 beta.
### Impact Description:
When we update our CI to Xcode 16 after it releases (likely in September), all tests should pass.
### Workaround:
Turning off the test.
### 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:
- Install Xcode 15 and run the test (this is happening in CI now).
- Install Xcode 16 latest beta and run the test.
Part of https://github.com/flutter/flutter/issues/148959
`handleEventLoopCallback()` should return `true` rather than `false` when there are tasks in the queue but the highest priority task is not run because of the `schedulingStrategy`. If `false` is returned when the queue still has tasks, the event loop stops, causing existing and new tasks to never be scheduled.
For full context, see https://github.com/flutter/flutter/issues/73766#issuecomment-2202427256.
Fixes#73766 and #82016.
This changes the mapping for the Dart SDK inside Flutter from `org-dartlang-sdk:///third_party/dart/sdk` to org-dartlang-sdk:///flutter/third_party/dart/sdk`. This URI changed in https://github.com/flutter/engine/pull/51917 but was not caught by tests because they only tested a specific set of mappings and there were no integration tests checking what URIs were actually produced by a running app.
So, this change also adds an integration tests that ensures that a real running app produces URIs that are then correctly mapped.
Fixes https://github.com/Dart-Code/Dart-Code/issues/5164.
Adds a new ScrollNotificationEnd example that demonstrates how to trigger an auto-scroll based on an individual sliver's `SliverConstraints` and `SliverGeometry`.
Then new example auto-scrolls one special "aligned item" sliver to the top or bottom of the viewport, whenever it's partially visible (because it overlaps the top or bottom of the viewport). This example differs from the existing ScrollEndNotification example because the layout of the to-be aligned sliver is retrieved from its `RenderSliver` via a
GlobalKey. The new example does not rely on all of the list items having the same extent.