22190 Commits

Author SHA1 Message Date
Ross Llewallyn
2c3c6b05da
Docs typo: comprised -> composed (#137896)
This is a simple, common grammar issue. See here:
https://en.wikipedia.org/wiki/Comprised_of
2023-11-10 15:00:35 -08:00
Chinmoy
0bde95dc06
Deprecates onWillAccept and onAccept callbacks in DragTarget. (#133691)
This PR deprecates `onWillAccept` and `onAccept` over `onWillAcceptWithDetails` and `onAcceptWithDetails`.

Fixes: #133347
2023-11-10 22:47:22 +00:00
Chris Bracken
d71fe92ec4
[macOS] Suppress Xcode 15 createItemModels warning (#138243)
As of Xcode 15 on macOS Sonoma, the following message is (repeatedly)
output to stderr during builds (repros on non-Flutter apps). It is
supppressed in xcode itself, but not when run from the command-line.

```
2023-11-10 10:44:58.031 xcodebuild[61115:1017566] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22267/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
Details:  createItemModels creation requirements should not create capability item model for a capability item model that already exists.
Function: createItemModels(for:itemModelSource:)
Thread:   <_NSMainThread: 0x6000027c0280>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
```

This suppresses this message from stderr in our macOS build logs.

Issue: https://github.com/flutter/flutter/issues/135277

## 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] 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
2023-11-10 14:14:32 -08:00
Kostia Sokolovskyi
a6aaad3487
GestureRecognizer should dispatch creation and disposal events. (#138223) 2023-11-10 13:14:14 -08:00
Elias Yishak
7a278ae47c
CommandResultEvent migrated (#138165)
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251

This event was only called from one file (`flutter_command.dart`). With the previous implementation, we actually sent 2 events, one for the result of the `commandPath` and another containing the `maxRss` value from `ProcessInfo`.

I have consolidated this down to just one event and used a function to safely get the `maxRss` value, or return null when if there was an error getting that integer value
2023-11-10 20:19:50 +00:00
John McCutchan
af246a51b7
Fix #128925 by properly setting the Android Event Source (#138241)
Touch events were being ignored by Google Maps because we were always setting
the event source to UNKNOWN. This PR maps our PointerDeviceKind to
Android's InputDevice.SOURCE_* enums.

Manually tested with Google Maps.

https://github.com/flutter/flutter/issues/128925
2023-11-10 12:02:54 -08:00
Elias Yishak
9a76efc8e3
Update analytics constructor to include FLUTTER_HOST (#138107)
Fixes issues:
- https://github.com/flutter/flutter/issues/138035

Similar to GA3, we will now record the host running the flutter tool, such as VSCode, stored in the `FLUTTER_HOST` env variable
2023-11-10 17:44:08 +00:00
Sam Rawlins
33c0f27464
Prepare the analyze_once test for removal of analysis_options_user support (#138229)
Fixes https://github.com/flutter/flutter/issues/138227. Work towards https://github.com/flutter/flutter/issues/82948

In c033718da0, the analyzer's support for `analysis_options_user.yaml` is dropped. So no lint is reported in this test, as expected. This PR changes the test to expect no lint, and also no write the edits that trigger the lint.
2023-11-10 17:38:56 +00:00
Dan Field
9295035e83
Drop unnecessary URI encoding of websocket url in listener (#137969)
This seems like an old remnant that is now completely unnecessary.
2023-11-10 17:21:17 +00:00
Tirth
983b2f6bc8
Adds useRootNavigator property to PopupMenuButton widget. (#137453)
Adds `useRootNavigator` property to `PopupMenuButton` widget.

Fixes #95425
2023-11-10 16:14:16 +00:00
flutter-pub-roller-bot
bc8acbe14b
Roll pub packages (#138163)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-11-10 01:20:14 +00:00
Camille Simon
c66bb0a18a
[Android] Support Android 34 (take 2) (#137967)
Re-lands https://github.com/flutter/flutter/pull/137191.

The fix for the issue causing that PR to be reverted was tested in this PR but ultimately landed separately in https://github.com/flutter/flutter/pull/138093.
2023-11-09 22:40:15 +00:00
Renzo Olivares
3225aa5815
Fix text selection in SearchAnchor/SearchBar (#137636)
This changes fixes text selection gestures on the search field when using `SearchAnchor`.

Before this change text selection gestures did not work due to an `IgnorePointer` in the widget tree.

This change:
* Removes the `IgnorePointer` so the underlying `TextField` can receive pointer events.
* Introduces `TextField.onTapAlwaysCalled` and `TextSelectionGestureDetector.onUserTapAlwaysCalled`, so a user provided on tap callback can be called on consecutive taps. This is so that the user provided on tap callback for `SearchAnchor/SearchBar` that was previously only handled by `InkWell` will still work if a tap occurs in the `TextField`s hit box. The `TextField`s default behavior is maintained outside of the context of `SearchAnchor/SearchBar`.

Fixes https://github.com/flutter/flutter/issues/128332 and #134965
2023-11-09 22:12:01 +00:00
hangyu
c4b11d801a
Make it possible to disable tapping to dismiss a tooltip. (#137375)
issue: https://github.com/flutter/flutter/issues/137438

Use case: I want to add action button is tooltip and thus want to disable tap to dismiss a tooltip.

![image](https://github.com/flutter/flutter/assets/108393416/39c606fd-d301-4ed4-a411-4916823e5757)
2023-11-09 20:10:04 +00:00
Qun Cheng
6673fe5cb1
Add onSubmitted and onChanged for SearchAnchor and SearchAnchor.bar (#136840)
Fixes #130687 and #132915

This PR is to add two properties: `viewOnChanged` and `viewOnSubmitted` to `SearchAnchor` and `SearchAnchor.bar` so we can control the search bar on the search view.
2023-11-09 19:08:52 +00:00
Reid Baker
94079b9c61
Improved Java version parsing (#138155)
Fixes #135402
Add fallback logic for a different format of java version output and handle no patch versions. 
Add tests for new logic output to prevent regressions.
2023-11-09 18:38:18 +00:00
Andrew Kolos
94550c6257
prevent tool crash when IntelliJValidatorOnMac encounters an installation with a missing CFBundleIdentifier (#138095)
Fixes https://github.com/flutter/flutter/issues/138029 (see my comment there for more info)
2023-11-09 03:46:25 +00:00
flutter-pub-roller-bot
55e692229e
Roll pub packages (#138114)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-11-09 00:48:01 +00:00
Christopher Fujino
a408c6d976
[flutter_tools] disable flutter build AAR for plugins (#137878)
Per discord discussion, building an AAR out of a plugin project has not worked for years, so let's just disable the functionality. Context: https://github.com/flutter/flutter/issues/137564
2023-11-08 23:12:08 +00:00
Michael Goderbauer
1ef6e99867
Remove physicalGeometry (#138103)
Looks like this was proactively added in https://github.com/flutter/engine/pull/20496, but never wired up to anything on any platform. It is also unused in framework and customer code; we never exposed this on e.g. MediaQuery.

Related engine PR: https://github.com/flutter/engine/pull/47825
2023-11-08 21:43:59 +00:00
Camille Simon
3215c492c8
[Android] Fix FlutterTestRunner.java deprecations (#138093)
Fixes deprecations causing unexpected standard error integration test failures: https://github.com/flutter/flutter/issues/138061, https://github.com/flutter/flutter/issues/138063, https://github.com/flutter/flutter/issues/138067, https://github.com/flutter/flutter/pull/138077.

Note that the issue this fixes was the same that was the cause for reverting https://github.com/flutter/flutter/pull/137191. I made this same fix in https://github.com/flutter/flutter/pull/137967 and changed `Mac_android run_release_test` to run in presubmit to see a successful run for proof that this fix works.
2023-11-08 21:10:48 +00:00
Dan Field
a3f2c7a4f8
Document additional cases (#137957)
Fixes https://github.com/flutter/flutter/issues/137924
Fixes https://github.com/flutter/flutter/issues/136885

The framework defaults to keeping the widget tree alive and ready to render regardless of application lifecycle events such as showing or hiding a view controller.

Add-to-app developers may be surprised by this, and tend to file bugs asking why `dispose` isn't called when the view is dismissed (or why memory usage is higher than expected after dismissing Flutter UI).

Adds documentation to explain the limitation and what to do instead.

/cc @zanderso @chinmaygarde @jonahwilliams @jason-simmons since we were discussing this in triage.
2023-11-08 19:10:22 +00:00
sanni prasad
7faa6261c2
Add support for color and color blendmode in FadeInImage (#137681)
Added "color" and "colorBlendMode" props in [FadeInImage](https://api.flutter.dev/flutter/widgets/FadeInImage-class.html) and applied it to both placeholder and the target image.

Added test to check weather both properties are applied to placeholder and the target image.

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

Migration is not required because I have added two optional props and have not updated any existing code. Devs may choose to use them if they have a usecase. Existing projects should not get affected.(no errors or warning)
2023-11-08 18:34:47 +00:00
Kostia Sokolovskyi
ca384b84e5
Ticker should dispatch creation and disposal events. (#137844) 2023-11-07 21:14:09 -08:00
Christopher Fujino
89692884a1
[flutter_tools] Fix local engine preview device (#138046)
Fixes https://github.com/flutter/flutter/issues/137982
2023-11-08 01:53:22 +00:00
Dan Field
e7246898b0
Revert "Add no-shuffle to reorderable_list_test.dart" (#137715)
Reverts flutter/flutter#137698

Not needed after https://github.com/flutter/flutter/pull/137697

Must not land until after that one
2023-11-07 15:17:00 -08:00
Greg Price
801a264691
Document where Curves curves correspond to CSS easing functions (#137318) 2023-11-07 15:14:53 -08:00
Hans Muller
84bfe64023
Added an AnimationController API doc example (#137975)
This example shows how to use `AnimationController` and
`SlideTransition` to create an animated digit like you might find on a
digital clock. New digit values slide into place from below, as the old
value slides upwards and out of view. Taps that occur while the
controller is already animating cause the controller's
`AnimationController.duration` to be reduced so that the visuals don't
fall behind.

You can try the example here:
https://dartpad.dev/?id=9553c20fe0fdb0c5447c1293e02400eb
2023-11-07 13:33:20 -08:00
Christopher Fujino
d550ba54eb
[flutter_tools] toolexit when using plugins with preview device (#136936)
Part of https://github.com/flutter/flutter/issues/130277

Without this, if a user runs an app that has plugins that call method channels with the `preview` device, the app will build successfully, however, they will get a runtime error when their dart code tries to call the method channel that does not exist in the native build (which was pre-built and thus does not include the plugin code).

This change adds a validation when injecting plugins that will tool exit if the device-id is `preview` and their project contains plugins with method channels.
2023-11-07 20:37:19 +00:00
Qun Cheng
ed70f4e248
Adaptive Switch (#130425)
Currently, `Switch.factory` delegates to `CupertinoSwitch` when platform
is iOS or macOS. This PR is to:
* have the factory configure the Material `Switch` for the expected look
and feel.
* introduce `Adaptation` class to customize themes for the adaptive
components.
2023-11-07 10:26:23 -08:00
Daco Harkes
da23eae33f
[native assets] Tool exit on build failure (#137995)
If the native assets feature is enabled, and the `build.dart` invocation fails, the `flutter build` and `flutter run` should abort.

Closes: https://github.com/flutter/flutter/issues/137910
2023-11-07 16:41:19 +00:00
Kostia Sokolovskyi
c0b21b16ef
SemanticsHandle should dispatch creation and disposal events. (#137960) 2023-11-06 14:14:42 -08:00
Kostia Sokolovskyi
4880aab113
ScrollActivity should dispatch creation and disposal events. (#137961) 2023-11-06 14:14:08 -08:00
Kostia Sokolovskyi
2d9a075dfc
Cover text_selection tests with leak tracking. (#137009) 2023-11-06 14:10:50 -08:00
Elias Yishak
17e0fe1a93
Migration for HotEvent for Flutter hot runner (#137717)
Related to tracker issue:
- https://github.com/flutter/flutter/issues/128251

For this migration, the `HotEvent` was being referenced in 2 additional files outside of `lib/src/reporting/events.dart`, shown below in the screenshot

<img width="257" alt="image" src="https://github.com/flutter/flutter/assets/42216813/97986f89-2253-4db1-9deb-bbced6321a16">
2023-11-06 21:33:11 +00:00
Ivan Inozemtsev
defa4bce0a
Change cast in json parsing (#137708)
`jsonDecode` decodes lists as `List<Object?>`, so the cast to `List<Object>` fails at runtime in sound null safety mode.
2023-11-06 17:29:07 +00:00
auto-submit[bot]
3649deb3f6
Reverts "Update BottomNavigationBar tests for M3" (#137948)
Reverts flutter/flutter#136624
Initiated by: HansMuller
This change reverts the following previous change:
Original Description:
This PR updates `BottomNavigationBar` unit tests for M3 migration.

More info in https://github.com/flutter/flutter/issues/127064

It was somewhat complex because existing tests relied on a lot of magic numbers.
2023-11-06 16:43:19 +00:00
Bruno Leroux
59d4d76705
Update BottomNavigationBar tests for M3 (#136624)
This PR updates `BottomNavigationBar` unit tests for M3 migration.

More info in https://github.com/flutter/flutter/issues/127064

It was somewhat complex because existing tests relied on a lot of magic numbers.
2023-11-06 15:15:07 +00:00
Taha Tesser
826bb0a809
Provide a helpful error message when ColorScheme.brightness doesn't match ThemeData.brightness (#137611)
fixes [Unexpected behaviour with ColorScheme.fromSeed and Brightness.dark](https://github.com/flutter/flutter/issues/127523)
2023-11-06 13:34:10 +00:00
Andrew Kolos
12de94d152
Fix tool exit message shown when user provides a non-list to "assets" for a deferred component (#137837)
Fixes #136163
2023-11-06 04:01:25 +00:00
Kostia Sokolovskyi
e8d9d9bfd5
HeroController should dispatch creation and disposal events. (#137835) 2023-11-03 20:42:47 -07:00
Alex Isaienko
b5fb6652d6
InheritedElement.removeDependent() (#129210)
Call the `dependency.removeDependent(this)` instead of `dependency._dependents.remove(this)` inside the `Element.deactivate()`. This allows `InheritedElements` to know when they can release resources associated with a given dependent `Element`.

Fixes #129207
2023-11-03 23:27:21 +00:00
Michael Goderbauer
8a0f9118ea
Remove unused generic type from BottomSheet (#137791)
Fixes https://github.com/flutter/flutter/issues/137424.

The generic type argument was unused.
2023-11-03 22:25:37 +00:00
Daco Harkes
7634609062
Pin dart-lang/native dependencies (#137601)
Pin the dependencies from dart-lang/native to a specific version during testing (rather than having them auto-upgrade during pub resolution). This will prevent tests using the template to start failing if a bad version is published to pub.

Closes: https://github.com/flutter/flutter/issues/137418

Also bumps dep in flutter_tools.
2023-11-03 22:16:04 +00:00
Chris Bracken
4455e86d90
Send caret rect to embedder on selection update (#137863)
Background: In the framework, the position of the caret rect is updated on each cursor position change such that if the user initiates composing input, the current cursor position can be used for the first character until the composing rect can be sent.

Previously, no update was sent on selection changes, on the assumption that the most recent cursor position will remain the correct position for the duration of the selection. While this is the case for forward selections, it is an incorrect assumption for reversed selections, where selection.base > selection.extent.

We now update the cursor position during selection changes such that the cursor position sent to the embedder is always the position at which next text input would occur. This is the start position of the selection or min(selection.baseOffset, selection.extentOffset).

Issue: https://github.com/flutter/flutter/issues/137677
2023-11-03 22:09:09 +00:00
Chris Bobbe
e7f99821cc
Tooltip docs: Recommend setting preferBelow to false in theme (#135879)
As discussed at https://github.com/flutter/flutter/pull/133007#issuecomment-1743916183, this is a docs change meant to help people in the absence of a fix for #133006, which is being closed as WONTFIX.
2023-11-03 20:18:36 +00:00
auto-submit[bot]
c4ce9479bb
Reverts "[Android] Support Android 34" (#137865)
Reverts flutter/flutter#137191
Initiated by: camsim99
This change reverts the following previous change:
Original Description:
Adds support for Android 34 in the following ways:

- Bumps integration tests compile SDK versions 33 --> 34
- Bumps template compile SDK version 33 --> 34
- Also changes deprecated `compileSdkVersion` to `compileSdk`

Part of https://github.com/flutter/flutter/issues/134220
2023-11-03 20:14:19 +00:00
Kostia Sokolovskyi
a52f030cda
InkFeature should dispatch creation and disposal events. (#137793) 2023-11-03 12:34:16 -07:00
Kostia Sokolovskyi
2369897f09
AppLifecycleListener should dispatch creation and disposal events. (#137840) 2023-11-03 12:31:46 -07:00
Hans Muller
3479aaba75
Updated the nested navigation NavigationBar example (#137788)
Updated the NavigationBar API doc that describes
examples/api/lib/material/navigation_bar/navigation_bar.2.dart and made
some cosmetic changes to the example to improve its appearance in
Material 3. Also did a little gratuitous reformatting.

Fixes #136125
2023-11-03 10:46:09 -07:00