In a ProxiedDevicePortForwarder, there might be a race condition where the local socket has been disconnected, but the remote end was still sending new data. In this case, avoid forwarding new data to the socket.
The interface for `ArgResults` from `package:args` has added new fields. Change the implementations of these in the conductor to extend `Fake` so that these aren't analyzer errors.
This broke the pub roll here: https://github.com/flutter/flutter/pull/146642#issuecomment-2050169629
This cleans up a few sliver classes, like moving RenderSliverVariedExtentList to the rendering layer (it was in the widgets layer), and moving SliverVariedExtentList to live with its sibling subclasses, SliverFixedExtentList, SliverList, and so on.
I moved these while working on SliverTree, so figure I should break out into a separate change.
SliverTree and SliverCarousel (both inbound in separate changes) will also be subclasses of RenderSliverFixedExtentBoxAdaptor, organizing them together felt easier to work with.
Related to https://github.com/flutter/flutter/issues/114299 and https://github.com/flutter/flutter/issues/125980
This adds support for adding the `--wasm` flag to `flutter run` and `flutter drive`
* Emits errors if you attempt to use the skwasm renderer without the `--wasm` flag
* Emits errors if you try to use `--wasm` when not using a web device
* Uses the skwasm renderer by default if you pass `--wasm` and no `--web-renderer`
It looks like the formatter was updated.
We have a test running on the FFIgen repo that checks that rerunning the generated bindings with FFIgen generates identical bindings.
Closes:
* https://github.com/dart-lang/native/issues/1072
fixes [DropdownMenu TrailingIcon can't be styled through providing an IconButtonTheme](https://github.com/flutter/flutter/issues/145081) (second PR)
### Description
This PR replaces `IconButton.style` with `ButtonStyle` when merging parent `IconButtonTheme` as `styleFrom` returns defaults for some properties.
https://github.com/flutter/engine/pull/51229 blocked [the roll](https://github.com/flutter/flutter/pull/146522) and had to be reverted, which is a shame, but on the bright side it made it possible to point the framework at my removal pr, at the point of its merging the first time
This fixes all errors that are fixable in the framework that would have blocked the roll. There are some that aren't fixable here (they need to be fixed in the engine)*, so I'll fix those in the engine but unfortunately I can't pick up another version here to re-test until I try to roll again ð¢
*This category is: uses of plugins that in turn have a `registerWith`, that references the v1 embedding. The plan to fix these cases is to leave the interface that that method relies on around for now. See https://github.com/flutter/packages/pull/6494#issuecomment-2046010323 for details
Convert `ProjectMigration.run()` and `ProjectMigrator.migrate()` to be async.
Needed for Swift Package Manager migration, which requires some async processes: https://github.com/flutter/flutter/pull/146256
Also move the vm service discovery logic into platform-specific implementation of `Device`s. This is to avoid having platform-specific code in attach.dart.
Fixes bugs in the text selection positioning calculations so that they work even when the field is scaled. In many cases, we were simply translating things around without applying the proper localToGlobal (or vice versa) transform.
| Before | After |
| --- | --- |
| <img src="https://github.com/flutter/flutter/assets/389558/a5a45472-98c5-4cdf-b382-218971fd9404" /> | <img src="https://github.com/flutter/flutter/assets/389558/f396a1af-2546-4e38-a9d9-6c6edfa38d94" /> |
Partial fix for: https://github.com/flutter/flutter/issues/144685
It looks like there are other problems where transforms aren't applied properly. Putting a transform at the root of the application, above MaterialApp, will expose more problems.
<details>
<summary>Sample code</summary>
```dart
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(const _App());
class _App extends StatelessWidget {
const _App();
@override
Widget build(BuildContext context) {
return const MaterialApp(home: _Home());
}
}
class _Home extends StatefulWidget {
const _Home();
@override
State<_Home> createState() => _HomeState();
}
class _HomeState extends State<_Home> {
final _controller = WebViewController();
final TextEditingController textEditingController = TextEditingController(
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
);
final OverlayPortalController overlayPortalController = OverlayPortalController();
@override
void initState() {
super.initState();
_controller
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(Uri.https('api.flutter.dev'));
}
@override
Widget build(BuildContext context) {
overlayPortalController.show();
return Scaffold(
appBar: AppBar(
title: const Text('Scaled WebView Tester'),
),
body: Stack(
children: <Widget>[
Transform.scale(
alignment: Alignment.topLeft,
scale: 0.5,
child: TextField(
controller: textEditingController,
maxLines: null,
),
),
OverlayPortal(
controller: overlayPortalController,
overlayChildBuilder: (BuildContext context) {
return Positioned(
top: 0.0,
left: 0.0,
child: SizedBox(
height: 1000,
width: 1000,
child: Stack(
children: <Widget>[
Positioned(
top: 90.0,
left: 0.0,
child: Container(
height: 1.0,
width: 1000,
color: Colors.blue,
),
),
Positioned(
top: 102.0,
left: 0.0,
child: Container(
height: 1.0,
width: 1000,
color: Colors.blue,
),
),
],
),
),
);
},
),
],
),
);
}
}
```
</details>
## Description
This PRs fixes a null pointer exception thrown when reset is called on a `DropdownButtonFormField` whose `onChange` callback is null.
## Related Issue
Fixes https://github.com/flutter/flutter/issues/146335
## Tests
Adds 1 tests.
Xcode 15 will be required for iOS App Store submission
> Please note that as of April 2024 all iOS and iPadOS apps submitted to the App Store must be built with a minimum of Xcode 15 and the iOS 17 SDK.
https://developer.apple.com/ios/submit/
And will also be required for Swift Package Manager support https://github.com/flutter/flutter/pull/146256.
We could swap to "required" but macOS developers don't technically need to upgrade. We can let the Store itself enforce its policies. And we can swap to Xcode 15 "required" when SPM adoption is further along.
Part of https://github.com/flutter/flutter/issues/144582
This is part 8 of a broken down version of the #140101 refactor.
This only makes one dependency explicit. Further PRs will do the same for other dependencies, until these APIs have no hidden dependencies.
This particular change attempts to be minimal. A future change will apply some formatting cleanup (newlines, reordering parameters and arguments) for clarity.
Relands https://github.com/flutter/flutter/pull/146181.
Just 3 commits:
1. a revert of the revert
2. the fix described in https://github.com/flutter/flutter/pull/146181#issuecomment-2038238869
3. updating two postsubmit tests from Java 11 to 17, as that is required for this new AGP version.
I've verified that `flutter build apk --flavor paid --debug` fails in `dev/integration_tests/flavors/` with the error in ci without (2), and succeeds with it.
I've also verified that the `dev/benchmarks/complex_layout` app builds successfully with Java 17.
That covers all the postsubmits that failed according [to the dashboard](https://flutter-dashboard.appspot.com/#/build).
Part of #137040 and #80374
`possibleResolutions` and `possibleResolutions` used a key containing the platform and the plugin name via `getResolutionKey`. The global list is not necessary and also confusing. It can be avoided by handling the resolution of plugins per platform. This helps to have a more self-contained plugin resolution. This also is necessary to reuse the plugin resolution logic (per platform) for #137040.
This PR makes it possible to remove the hard-coded 32.0 unit padding coming from ListTile when trailing is not null. Which it always it as `ExpansionTile` always provides a widget there. Currently there is no way to remove it and people have to hack around it: e.g.
https://stackoverflow.com/questions/54714836/how-to-remove-default-padding-from-expansiontiles-header
The issue is quite old and I came across it today and decided to put together a quick fix.
Fixes#145268
The change should be non-breaking as the default stays the same. But I have no issue with changing something if requested. (naming-wise, functionality-wise etc...)
This PR adds a `semanticsLabel` field to the MenuItemButton, letting users pass in a Semantics Label if they have issues with the way a ScreenReader reads the generated text.
fixes: [142939: Screen Readers won't read punctuation characters in Shortcuts](https://github.com/flutter/flutter/issues/142939)
Reverts: flutter/flutter#146181
Initiated by: LongCatIsLooong
Reason for reverting: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows_android%20flavors_test_win/11086/overview
Original PR Author: gmackall
Reviewed By: {reidbaker, christopherfujino}
This change reverts the following previous change:
Bump almost all tests to AGP 8.1 and Gradle 8.3
Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.
Should bump templates next
Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.
Bump almost all tests to AGP 8.1 and Gradle 8.3
Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.
Should bump templates next
Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.
- Introduces the ability to control whether RawMagnifier uses a clip on
its decoration. (It still has to use a clip for its magnified image.)
- Uses `BlurStyle.outer` to remove the clip for CupertinoMagnifier.
- Many changes to the documentation around magnifiers and shadows.
- Implements `BoxShadow.copyWith` which somehow we had never needed
before.
- Makes `debugDisableShadows` handle `BlurStyle.outer` correctly.
- Adds `MagnifierInfo.toString`.
- Aligns various `operator ==`s with the style guide.
- Makes MagnifierDecoration a separate concept from Decoration, since
it's not actually compatible anywhere.
- Removes some dead code and makes other minor code simplifications.
- Uses double syntax rather than integer syntax for various double
literals for clarity.
I expect one minor golden image change (antialiasing change on
Cupertino's magnifier test).
Currently, `TextStyle.lerp()` does not properly interpolate the shadows property between two TextStyle instances. This PR addresses the issue by using ui.Shadow.lerpList() to interpolate the shadow lists, ensuring that the individual shadow properties (blur radius, color, and offset) are correctly lerped.
The changes include:
- Updating the `TextStyle.lerp()` method to use `ui.Shadow.lerpList()` for the shadows property.
- Adding a new test case in `text_style_test.dart` to verify the correct interpolation of text shadows.
Here is a snippet showing the comparison, when using `ui.Shadow.lerpList()`
https://dartpad.dev/?id=799c4bec8b791b74580193174759b93dCloses#145665