23563 Commits

Author SHA1 Message Date
Gray Mackall
6553713e4a
[CP-stable] Cherry pick "Fix flutter build aar for modules that use a plugin" (#154944)
Sum of changes is:
cherry pick of https://github.com/flutter/flutter/pull/154757
Merge
manual application of of https://github.com/flutter/flutter/pull/154945
manual application of https://github.com/flutter/flutter/pull/154967

Copied form below from automatic label (this is a cherry pick of https://github.com/flutter/flutter/pull/154757).

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

Fixes https://github.com/flutter/flutter/issues/154371.

### 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 crash when building Flutter modules for android with `flutter build aar`, when using Android Gradle Plugin 8.0+.

### 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 the mentioned crash when building a module as an aar with Android Gradle Plugin 8.0+.

### Workaround:
Is there a workaround for this issue?

No.

### 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?

Build a module:
1. `flutter create foobar --template=module`
2. `cd foobar`
3. Edit the `.android/build.gradle` to use AGP 8.1.
4. `flutter run`/`flutter build aar`
2024-09-11 16:55:50 +00:00
flutteractionsbot
98ba471ea2
[CP-stable]Fix Drawer prematurely snapping (#154720)
### Issue Link

https://github.com/flutter/flutter/issues/154722

### Target

stable

### Cherry pick PR Link

https://github.com/flutter/flutter/pull/154720

### Changelog Description

The `Drawer` widget will snap completely open or shut after being dragged more than halfway.

### Impacted Users

This affects everyone who has a `Drawer` widget in their mobile app.

### Impact Description

Fortunately, the impact of this issue is limited to visual jank. But it will likely be widespread across app developers.

### Workaround

There isn't a workaround for this.

### Risk

low (This fix was merged over 2 weeks ago.)

### Test Coverage

This fix is covered by the test added in the linked pull request.

### Validation Steps

The fix can be verified by opening a mobile Flutter app and dragging a `Drawer` open or shut.
2024-09-11 16:11:14 +00:00
Andrew Kolos
90c7ddb667
[CP-stable] When shutting down chrome, guard the call to ChromeConnection.getTab (#154380)
This is a custom hotfix patch to fix https://github.com/flutter/flutter/pull/154366 and https://github.com/flutter/flutter/issues/153064 on the stable channel. The reason for a custom patch rather than a bot-created PR is that the fixes on master were done by two sequential PRs (https://github.com/flutter/flutter/pull/153978 and https://github.com/flutter/flutter/pull/154366). This CP patch is also a subset of those changes (calls to Chrome when shutting down at the end of `flutter run -d chrome`).
2024-09-11 15:45:30 +00:00
flutteractionsbot
348da8b7f7
[CP-stable]Make sure usesUnsupportedDependencyVersions property exists before checking it (#154270)
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 >
2024-08-28 17:37:50 +00:00
flutteractionsbot
611b8e1f5d
[CP-stable]Reland "Upgrade template Gradle, App AGP, Module AGP, and Kotlin versions, and tests"... but no longer upgrade module AGP version (#154199)
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`
2024-08-27 22:07:56 +00:00
Renzo Olivares
bc472b41ef
[CP-stable] Fix BaseTapAndDragGestureRecognizer should reset drag state after losing gesture arena (#151989) (#153935)
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
2024-08-27 21:12:49 +00:00
Renzo Olivares
bc7fd79593
[CP-stable] Fix deleting text in EditableText with CJK keyboard while in CupertinoPageRoute throws exception (#153822) (#153946)
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
2024-08-26 19:47:13 +00:00
flutteractionsbot
7640fd6c3a
[CP-stable]Handle "Service connection disposed" error from VmService disconnecting while requests are outstanding (#153769)
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.
2024-08-26 19:38:06 +00:00
flutteractionsbot
a0bde754cf
[CP-stable][native_assets] Fix macOS host build failure when there are no frameworks to sign. (#153967)
### 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.
2024-08-26 18:45:16 +00:00
flutteractionsbot
b023fad9e5
[CP-stable]add HttpException to the list of handled exceptions within ResidentWebRunner::run (#153579)
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.
2024-08-19 22:58:26 +00:00
Andrew Kolos
a1f08ba11c
[CP-stable] Bump dependency on package:vm_service from 14.2.4 to 14.2.5 (#153597)
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.
2024-08-19 22:23:06 +00:00
flutteractionsbot
613e43c3ab
[CP-stable][iOS] Copy Flutter.framework.dSYM into app archive (#153322)
### 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.*
2024-08-13 18:14:42 +00:00
Martin Kustermann
ec5d4074c6
[CP Stable] Emit source maps for wasm in flutter build web --wasm (#151643) (#153310)
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)
2024-08-13 18:00:14 +00:00
flutteractionsbot
cb28dec614
[CP-stable]Handle a SocketException thrown when sending the browser close command to Chrome (#153294)
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.
2024-08-13 17:55:49 +00:00
flutteractionsbot
8997882808
[CP-stable]Add xcresulttool --legacy flag for deprecated usage (#153117)
### 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.
```
2024-08-13 17:46:57 +00:00
flutteractionsbot
dcc1f06039
[CP-stable]Change flutter_build_with_compilation_error_test to check stdout or stderr (#153116)
### 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
2024-08-12 18:07:56 +00:00
Renzo Olivares
c4dccaf58c
[CP-beta] Fix SelectionArea scrolling conflicts (#151138) (#152423)
Fixes `SelectionArea`/`SelectableRegion` scrolling jank when a `SelectionArea`/`SelectableRegion` is used as a child of a `Scrollable` like `ListView` or `PageView`.

Fixes #152420

Cherry-pick of: https://github.com/flutter/flutter/issues/151138

Related issue: https://github.com/flutter/flutter/issues/150897
2024-07-27 04:20:05 +00:00
Jonathan Lau
5698944196
Fix scheduler event loop being stuck due to task with Priority.idle (#151168)
`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.
2024-07-02 23:59:20 +00:00
Matej Knopp
348fdeebb3
Fix result propagation in RenderSliverEdgeInsetsPadding.hitTestChildren (#149825)
Fixes https://github.com/flutter/flutter/issues/149824
2024-07-02 23:21:22 +00:00
Michael Goderbauer
cfa7777f7a
docImports for flutter_test (#151189)
Part of https://github.com/flutter/flutter/issues/150800

Issues encountered:
2024-07-02 23:05:52 +00:00
Igor Hnízdo
46030f1eff
Interactable ScrollView content when settling a scroll activity (#145848)
Currently when the user:
- flings a scrollable 
- overscrolls, and the scrollable is trying to settle
- applies `DrivenScrollActivity`
- swipes from one tab to the next

All inputs are discarded or forwarded directly to the Scrollable widget (scroll activity).

This leads to situations like these:

https://github.com/flutter/flutter/assets/12874766/51b7876f-5a91-4a86-aa21-c72f0b2c4263

https://github.com/flutter/flutter/assets/12874766/2f756a45-5e42-47d7-98a0-12f071d34e7c

https://github.com/flutter/flutter/assets/12874766/5eb998a1-b3b8-42a1-8b04-543f68823c2b

Which leads to poor experience on iOS. The native behavior of iOS is to allow touches while a scrollable is settling:

https://github.com/flutter/flutter/assets/12874766/e1ae61f8-d59c-40ae-a4c4-ad919f0dc6bf

This PR alters the `shouldIgnoreTouches` of `BallisticScrollAvtivity` and `DrivenScrollActivity` to not make the child of the scrollable ignore touches.

Fixes #145330

Currently tests that test tap to stop are not working as the taps now register when they should not. Because there is no distinction between flings inside and flings that go out of range.
2024-07-02 23:01:44 +00:00
Danny Tuppeny
ce0e5c4330
[flutter_tools] Update the mapping for the Dart SDK internal URI (#151170)
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.
2024-07-02 22:56:17 +00:00
Qun Cheng
5d3c4568d4
Fix typo (#151192)
Trivial PR to fix typo. The code snippet uses `alignment1`.

4cb6d38492/packages/flutter/lib/src/animation/animation.dart (L208-L211)
2024-07-02 22:15:06 +00:00
Andrew Kolos
8acf86d995
[tool] Fix stdin.flush calls on processes started by FakeProcessManager (#151183)
Fixes https://github.com/flutter/flutter/issues/151151
2024-07-02 20:40:06 +00:00
Andrew Kolos
af913a75b5
Use ErrorHandlingFileSystem.deleteIfExists when deleting .plugin_symlinks (#151073)
Fixes https://github.com/flutter/flutter/issues/137168.
2024-07-02 18:46:22 +00:00
Hans Muller
acb41f3174
ScrollEndNotification example: auto-scroll based on RenderSliver constraints and geometry (#143538)
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.
2024-07-02 18:46:19 +00:00
Michael Goderbauer
12e3635e8e
docimports for painting (#151143)
Part of https://github.com/flutter/flutter/issues/150800
2024-07-02 17:44:06 +00:00
Michael Goderbauer
9ff9c67272
docimports for scheduler (#151126)
Part of https://github.com/flutter/flutter/issues/150800
2024-07-02 17:31:58 +00:00
Nate Wilson
c9ec61ee90
dismissible.dart code cleanup (#150276)
While I was working on #149966, I noticed a couple of ways that `_DismissibleState` could be tweaked to be easier to follow.

Changes are described in comments below, and we're currently [awaiting a test exemption](https://discord.com/channels/608014603317936148/608018585025118217/1251255349277626490).
2024-07-02 17:31:53 +00:00
Michael Goderbauer
12954d1a38
docimports for physics (#151125)
Part of https://github.com/flutter/flutter/issues/150800

The `physics` library is completely clean after this! 🥳
2024-07-02 17:31:51 +00:00
Michael Goderbauer
06b9f7ba0b
docimports for services (#151134)
Part of https://github.com/flutter/flutter/issues/150800
2024-07-02 17:30:41 +00:00
Michael Goderbauer
3cf357ac7b
docimports for cupertino (#151149)
Part of https://github.com/flutter/flutter/issues/150800

Cupertino is fully clean after this!
2024-07-02 17:30:39 +00:00
Michael Goderbauer
82aaf3b44c
docimports for gestures (#151123)
Part of https://github.com/flutter/flutter/issues/150800
2024-07-02 17:29:43 +00:00
Michael Goderbauer
455be19d92
Docimports for foundation (#151119)
Part of https://github.com/flutter/flutter/issues/150800

Things I couldn't get to work:
2024-07-02 16:19:14 +00:00
Michael Goderbauer
0aedb5e688
docimports for semantics (#151132)
Part of https://github.com/flutter/flutter/issues/150800

Issues encountered:
2024-07-02 16:17:41 +00:00
Jonah Williams
61326afdae
[flutter_driver] add allocator mtl to memory event allowlist. (#151153)
Flutter driver side changes for https://github.com/flutter/engine/pull/53618
2024-07-02 15:34:04 +00:00
Sigurd Meldgaard
21d996929b
Refactor BuildInfo to always require packageConfigPath (#150559)
Refactor warming up to #150196
2024-07-02 11:19:31 +02:00
Tong Mu
b6163726a1
Fix: CupertinoActionSheet should take up max height when actions section is short (#150708)
This PR addresses a bug from the previous rewrite of the `CupertinoActionSheet` height allocation algorithm. 

The previous approach assigns the content section with a minimal height. As a result, if the actions section is shorter than `_kActionSheetActionsSectionMinHeight`, the remaining space will not be taken by the content section.

As far as I know, this algorithm can not be implemented by simply compositing simple layout widgets, and therefore I created a new widget `_PriorityColumn` that uses a custom layout algorithm. (The resulting code is still shorter (and cleaner) than before the rewrite!)

Some other trivial refactor is also done to clean up the code around parameters of `_ActionSheetMainSheet`.
2024-07-02 04:47:37 +00:00
Andrew Kolos
271e0427e3
[tool] remove some temporary printTrace calls (#151074)
Cleans up printTrace calls added while investigating https://github.com/flutter/flutter/issues/146879.

Also makes[ this `catch` clause ](https://github.com/flutter/flutter/pull/151074/files#diff-214723283174eb75e740a102252215723aa56716226ea92d084ef8a5bea4e931L578-R581)more precise.
2024-07-02 00:53:19 +00:00
Nate Wilson
d07a165d22
Implementing a few switch statements (#150946)
I really like how patterns can be used for variable assignment and avoiding duplicated logic. (related: #150942)

```dart
// before
final GestureRecognizer? recognizer = info.recognizer;
if (recognizer is TapGestureRecognizer) {
  if (recognizer.onTap != null) {
    configuration.onTap = recognizer.onTap;
    configuration.isLink = true;
  }
} else if (recognizer is DoubleTapGestureRecognizer) {
  if (recognizer.onDoubleTap != null) {
    configuration.onTap = recognizer.onDoubleTap;
    configuration.isLink = true;
  }
}

// after
switch (info.recognizer) {
  case TapGestureRecognizer(:final VoidCallback? onTap):
  case DoubleTapGestureRecognizer(onDoubleTap: final VoidCallback? onTap):
    if (onTap != null) {
      configuration.onTap = onTap;
      configuration.isLink = true;
    }
}
```
2024-07-01 23:36:32 +00:00
auto-submit[bot]
dbc2dc88bc
Reverts "Upgrade template Gradle, App AGP, Module AGP, and Kotlin versions, and tests (#150969)" (#151147)
Reverts: flutter/flutter#150969
Initiated by: goderbauer
Reason for reverting: Failing test in https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8743574743030691569/+/u/run_android_obfuscate_test/stdout
Original PR Author: gmackall

Reviewed By: {christopherfujino, reidbaker}

This change reverts the following previous change:
After the land of https://github.com/flutter/engine/pull/53592, there is some log spam:
```
e: /Users/mackall/.gradle/caches/transforms-3/c1e137371ec1afe9bc9bd7b05823752d/transformed/fragment-1.7.1/jars/classes.jar!/META-INF/fragment_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/mackall/.gradle/caches/transforms-3/d86c7cb1c556fe1655fa56db671c649c/transformed/jetified-activity-1.8.1/jars/classes.jar!/META-INF/activity_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
...
```

I think this is harmless, but still annoying. Upgrading the AGP version fixes it. To be honest, I don't know why (I expected the Kotlin version would do it). But after https://github.com/flutter/flutter/pull/146307, our tests have been running on AGP/Gradle 8.1/8.3 for a while, so it makes sense to upgrade anyways.

In a follow up PR:
1. Also upgrade the tests that were left behind in https://github.com/flutter/flutter/pull/146307, as I think removal of discontinued plugins paved the way here.
2024-07-01 23:31:26 +00:00
Gray Mackall
bd5ab96018
Upgrade template Gradle, App AGP, Module AGP, and Kotlin versions, and tests (#150969)
After the land of https://github.com/flutter/engine/pull/53592, there is some log spam:
```
e: /Users/mackall/.gradle/caches/transforms-3/c1e137371ec1afe9bc9bd7b05823752d/transformed/fragment-1.7.1/jars/classes.jar!/META-INF/fragment_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/mackall/.gradle/caches/transforms-3/d86c7cb1c556fe1655fa56db671c649c/transformed/jetified-activity-1.8.1/jars/classes.jar!/META-INF/activity_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
...
```

I think this is harmless, but still annoying. Upgrading the AGP version fixes it. To be honest, I don't know why (I expected the Kotlin version would do it). But after https://github.com/flutter/flutter/pull/146307, our tests have been running on AGP/Gradle 8.1/8.3 for a while, so it makes sense to upgrade anyways.

In a follow up PR:
1. Also upgrade the tests that were left behind in https://github.com/flutter/flutter/pull/146307, as I think removal of discontinued plugins paved the way here.
2024-07-01 21:41:59 +00:00
John McDole
33be93b210
Read AndroidManifest.xml and emit manifest-aar-impeller-(enabled|disabled) analytics (#150970)
Same as #150791 except with AARs (`flutter build module`)
2024-07-01 18:50:24 +00:00
Michael Goderbauer
61f891df51
More docimports for animation library (#151011)
docimports for references in doc comments on library statements now work!

Part of https://github.com/flutter/flutter/issues/150800
2024-07-01 18:25:10 +00:00
Matthias Ngeo
c11ff3bbd8
Fix missing [ in docs (#151091)
This is a trivial fix for a typo in the docs.
2024-07-01 17:49:49 +00:00
Jason Simmons
1ebbb9d711
Fix teardown of a FocusScopeNode in material/app_test (#151115)
This test suite had been failing when run with --test-randomize-ordering-seed=20240701
2024-07-01 17:06:54 +00:00
Jason Simmons
38af6be9fb
Reduce the depth used in a test that applies finders to deep widget trees (#151049)
With today's random test order (--test-randomize-ordering-seed=20240629) this test is failing due to stack overflows when run on Windows.
2024-06-29 20:06:24 +00:00
flutter-pub-roller-bot
4534d48f50
Roll pub packages (#150827)
This PR was generated by `flutter update-packages --force-upgrade`.
2024-06-29 00:19:20 +00:00
Andrew Kolos
28ff59513b
[tool] when writing to openssl as a part of macOS/iOS code-signing, flush the stdin stream before closing it (#150120)
Fixes https://github.com/flutter/flutter/issues/100584. Might help https://github.com/flutter/flutter/issues/137184.
2024-06-28 22:01:04 +00:00
Tim Lehmann
f5b671aac7
Draggable feedback positioning (#149040)
Reopened after revert in #147658

Another test was added in the meantime to `draggable_test.dart` that
didn't call `gesture.up()`. I added this call to the test and now all
tests pass.

---
# Original Description (#145647):
We changed the coordinates used to position the `Draggable` feedback by
transforming them into the `Overlay`s coordinate space. This has no
influence on any untransformed `Overlay`, most Flutter apps should be
not affected.
This PR fixes the positioning of the feedback in transformed context
(see #145639 for before video):


https://github.com/flutter/flutter/assets/42270125/df34e198-0667-453d-a27a-a79b2e2825a1

- fixes #145639 

## 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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes

---------

Co-authored-by: Jesper Bellenbaum <ayu4ger@gmail.com>
2024-06-28 11:14:20 -07:00