22418 Commits

Author SHA1 Message Date
Polina Cherkasova
2dc811135c
Turn off leak tracker in master to make found leaks not blocking. (#138567) 2023-11-16 14:45:33 -08:00
Jason Simmons
d859865e34
Enable the silent flag for invalid string exceptions when building a TextSpan (#138564)
This error can occur in a release app (for example, if the text comes from user input that is not valid UTF-16).  In that case, TextSpan will replace the invalid text with a placeholder character.
2023-11-16 21:55:26 +00:00
Arpit Gandhi
428bff1dde
#60704: Pass cert for TLS localhost connection (#106635)
*Pass locally generated certificate via command line*

*Fixes: #60704*

Added ARGS: 

- web-tls-cert-path
- web-tls-cert-key-path

Passing the path of local certificate and the key to cert will allow flutter tool to create a secure debugging session on chrome

**Pre-launch Checklist**

✅   I read the [Contributor Guide](https://github.com/flutter/flutter/wiki/Tree-hygiene#overview) and followed the process outlined there for submitting PRs.
✅   I read the [Tree Hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene) wiki page, which explains my responsibilities.
✅   I read and followed the [Flutter Style Guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo), including [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).
✅   I signed the [CLA](https://cla.developers.google.com/).
✅   I listed at least one issue that this PR fixes in the description above.
✅   I updated/added relevant documentation (doc comments with ///).
✅   I added new tests to check the change I am making.
✅   All existing and new tests are passing.
2023-11-16 21:19:07 +00:00
lsaudon
9be8f4fd58
Bump cupertino_icons to 1.0.6 (#136962)
Bump cupertino_icons to 1.0.6
2023-11-16 21:15:04 +00:00
Fedor Blagodyr
27394f6052
Fix sliver persistent header expand animation (#137913)
Added animation status check at showOnScreen method to prevent broken animation of expanding SliverAppBar when focusing EditableText

close #137901
2023-11-16 21:13:14 +00:00
Ian Hickson
4d788b109d
Reduce animations further when --no-cli-animations is set. (#133598) 2023-11-16 21:05:22 +00:00
Taha Tesser
19e284f88f
Introduce AnimationStyle (#137945)
This PR introduces `AnimationStyle`, it is used to override default animation curves and durations in several widgets.

fixes  [Add the ability to customize MaterialApp theme animation duration](https://github.com/flutter/flutter/issues/78372)
fixes [Allow customization of showMenu transition animation curves and duration](https://github.com/flutter/flutter/issues/135638)

Here is an example where popup menu curve and transition duration is overriden:

```dart
          popUpAnimationStyle: AnimationStyle(
            curve: Easing.emphasizedAccelerate,
            duration: Durations.medium4,
          ),
```

Set `AnimationStyle.noAnimation` to disable animation.
```dart
    return MaterialApp(
      themeAnimationStyle: AnimationStyle.noAnimation,
```
2023-11-16 18:33:20 +00:00
Dan Field
c6c451ee46
Just use string interpolation for ws url for tests (#138235)
Follows up on https://github.com/flutter/flutter/pull/137969 - we don't
need decodeComponent here
2023-11-16 10:27:25 -08:00
Bruno Leroux
dcdf72a670
[flutter_tools] - Add queries section to Android manifest file (#137207)
## Description

This PR adds a new section to the Android manifest file.
This section is required for https://github.com/flutter/engine/pull/44579 (because it uses `PackageManager.queryIntentActivities` API ), see:

1. https://developer.android.com/training/package-visibility?hl=en
2. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT
3. https://developer.android.com/reference/android/content/pm/PackageManager?hl=en#queryIntentActivities(android.content.Intent,%20android.content.pm.PackageManager.ResolveInfoFlags)

## Related Issue

Android manifest update for https://github.com/flutter/flutter/issues/107603

## Tests

This PR updates the integration tests and examples Android manifest files, this will help catch error or warning related to this change.
2023-11-16 08:57:20 +00:00
Elias Yishak
04afff387f
Catch error for missing directory in FontConfigManager (#138496)
Closes:
- https://github.com/flutter/flutter/issues/138434

We will catch any errors while attempting to clear the temp directories that don't exist for the `FontConfigManager` class
2023-11-15 23:17:29 +00:00
Bernardo Ferrari
2afec776c9
Make UnderlineInputBorder consistent (#124153)
This was easy to implement. I like the result, I think `borderRadius.zero` -> `borderRadius.circular` makes a nice transition, and many places (like macOS) use an effect similar to this PR, while Google doesn't use anywhere (yet). I'm curious if it is going to break goldens or google testing.

<img width="954" alt="ttt" src="https://user-images.githubusercontent.com/351125/229918871-9f2ab851-6b41-44f5-80b9-c7928a8c0014.png">

What do you think? cc @HansMuller @gspencergoog. Is this something you want, should I ask the community, or do you prefer the current one?

Side effects:
- This makes strokeAlign work with `UnderlineInputBorder` (TODO: fix `drawLine` when borderRadius is zero).
- This is faster than the current implementation (clip is slow on Skia). 🚀 
- We could just call `BoxBorder._paintNonUniformBorder` (if it weren't private). Single LOC implementation.
- Web does this by default:
![image](https://user-images.githubusercontent.com/351125/233448671-90ce62ff-be91-40ca-8007-e82b57f3272e.png)
- Apparently no tests fail and most usages around (via code search) seem to be without a borderRadius.
2023-11-15 23:06:57 +00:00
Greg Spencer
f796e62cee
Prepare ShortcutActivator and ShortcutManager to migrate to KeyEvent from RawKeyEvent. (#136854) 2023-11-15 15:05:58 -08:00
Srujan Gaddam
d8ffc7390c
Pin package:web 0.4.0 (#138428)
This version is needed so that dart:js_interop can move to extension
types. Also adds some code to handle some breaking changes:

- Body -> Response. Body was an IDL interface mixin type we exposed in
dart:html. Going forward, users should either use Request or Response.
- Casts to JSAny. These are temporary until we move package:web types to
extension types. Currently, package:web types can't implement JSObject
as JSObject will move to be an extension type itself.

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
2023-11-15 15:03:21 -08:00
auto-submit[bot]
82a7a62b45
Reverts "Reland VelocityTracker update (#132291)" (#138512)
Reverts flutter/flutter#137381
Initiated by: Piinks
This change reverts the following previous change:
Original Description:
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.

Relands #132291
Fixes https://github.com/flutter/flutter/issues/97761

The change was reverted due to flakiness it introduced in tests that use fling gestures.
* https://github.com/flutter/flutter/issues/135728
2023-11-15 21:22:19 +00:00
Yegor
465288588f
[web] skip flaky overflow_clipbehavior_none.cupertino.0.png golden check (#138498)
Skipping the test due to
https://github.com/flutter/flutter/issues/137669. It's not clear which
PR started it, so we can't revert anything, and the fix is not yet clear
either. However, the flakiness is very high and is disruptive to the
Flutter team.
2023-11-15 12:58:53 -08:00
Kate Lovett
1ac73332bc
Reland VelocityTracker update (#132291) (#137381)
This updates the implementation to use the stopwatch from the Clock object and piping it through to the TestWidgetsFlutterBinding so it will be kept in sync with FakeAsync.

Relands #132291
Fixes https://github.com/flutter/flutter/issues/97761

The change was reverted due to flakiness it introduced in tests that use fling gestures.
* https://github.com/flutter/flutter/issues/135728
2023-11-15 19:31:48 +00:00
Kate Lovett
cf18d250ad
Fix 2D tap to stop scrolling (#138442)
Adopted from https://github.com/flutter/flutter/pull/133750
That PR was abandoned. This finishes it up so we can land it.
Fixes https://github.com/flutter/flutter/issues/133529

Moves the `PanGestureRecognizer` used to drag the content along both axis to the outer vertical `Scrollable` subclass instead of the inner horizontal `Scrollable` subclass.

- This solves the issue of the inner `Scrollable` gestures being disabled while the outer `Scrollable` is scrolling
- Enables the user to stop the scroll movement by dragging the content again
2023-11-15 18:29:40 +00:00
Binni Goel
684980e97d
SemanticOwner should dispatch creation and disposal events (#138388) 2023-11-15 09:27:55 -08:00
xubaolin
c3f4524061
Reland [SingleChildScrollView] Correct the offset pixels if it is out of range during layout (#136871)
Reland https://github.com/flutter/flutter/pull/136239 which was reverted by https://github.com/flutter/flutter/pull/136744
Fixes https://github.com/flutter/flutter/issues/105733
FIxes https://github.com/flutter/flutter/issues/135865

Do not merge before the customer finish the migration. @Piinks
2023-11-15 01:06:23 +00:00
Kate Lovett
98827bb569
Add to TableCell docs (#138258)
Fixes https://github.com/flutter/flutter/issues/42523
Came across a trivial doc issue - now it will be fixed. 😁
2023-11-14 23:20:33 +00:00
Elias Yishak
d5b67035b0
Unified analytics migration for CodeSizeAnalysis (#138351)
Part of tracker issue:
- https://github.com/flutter/flutter/issues/128251

This migrates the event being sent when the "--analyze-size" is used in a flutter invocation

The only file that had this event being sent from is `packages/flutter_tools/lib/src/base/analyze_size.dart`
2023-11-14 20:23:40 +00:00
Taha Tesser
e8c2bb1356
Reland "Update framework_test.dart to remove ButtonBar usage and remove references from other clases (#137550) (#137753)
This PR removes `ButtonBar` usage from `framework_test.dart` class and update other references in preparation for `ButtonBar` deprecation

related to https://github.com/flutter/flutter/issues/127955

reland https://github.com/flutter/flutter/pull/137550
2023-11-14 17:55:05 +00:00
Jackson Gardner
07d73630fb
Consume flutter.js from the engine artifacts. (#137113)
Work in progress... currently testing against presubmit.
2023-11-14 17:00:29 +00:00
Michael Goderbauer
c4b706cd58
Finally remove analysis_options_user.yaml (#138261)
🫡

This was terribly outdated and has long been superseded by `package:flutter_lints`. Also, as of c033718da0 support for this was removed from the analyzer and this file is now even more useless, if that's even possible.

Fixes https://github.com/flutter/flutter/issues/82948.
2023-11-13 22:13:08 +00:00
huycozy
61c007a3f7
Update DraggableScrollableSheet docs to reflect API change (#136471)
### Description

This PR intends to update `DraggableScrollableSheet` docs for Web and Desktop platforms. On these platforms, the vertical dragging gesture does not provide natural behavior similar to other desktop applications. 

By adding a note before the sample code so users are aware that the sample code will not work as expected on Desktop and Web. Also, refer to the instructions if they still want to implement it on these platforms.

### Related issue

Fixes https://github.com/flutter/flutter/issues/111372
2023-11-13 21:48:03 +00:00
Greg Spencer
1b9cab7138
Clean up synonyms, key code generation. (#138192)
## Description

This cleans up how synonyms are calculated, and adds a reverse mapping from pseudo keys to the real keys they are synonyms of.

Updates the `layout_goals.json` to include the "Space" key, since that was added in the engine without updating the generation configuration.
2023-11-13 20:13:00 +00:00
Polina Cherkasova
793827d98a
Upgrade leak tracker. (#138283) 2023-11-13 09:47:55 -08:00
Kristijan Žic
0539c8bdee
Fixes vscode path installed via snap (#136997)
Fixes the #136996
Readresses the #54358

Before:
```sh
[✓] VS Code (version unknown)
    • VS Code at /snap/code/current
    • Flutter extension version 3.74.0
    ✗ Unable to determine VS Code version.
```

After:
```sh
[✓] VS Code (version 1.83.1)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.74.0
```

*List which issues are fixed by this PR. You must list at least one
issue.*

## 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 15:11:01 -08:00
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