21228 Commits

Author SHA1 Message Date
Zachary Anderson
fdb71de7a0
Revert "Fix issue where DevTools would not be immediately available when using --start-paused" (#128117)
Reverts flutter/flutter#126698

There are a bunch of tool crashes on CI that start with this commit. I'm
not sure this PR is the cause because there is no backtrace from the
tool on the crashes. The only error message is `Oops; flutter has exited
unexpectedly: "Null check operator used on a null value`.
2023-06-02 07:31:07 -07:00
Michael Goderbauer
60a87d0798
Sync Lints (#127976)
Syncs our lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml:
* removed the deprecated `iterable_contains_unrelated_type` and `list_remove_unrelated_type` lints (their replacement `collection_methods_unrelated_type` was already enabled for us)
* enabled the new `no_self_assignments` and fixed one issue triggered by the lint.
2023-06-02 04:27:17 +00:00
Qun Cheng
ab70aea3ee
Text should still be centered when search bar height is less than 48 (#128068)
Fixes #127092

This fix can solve the alignment issue in `SearchBar` but we still need to investigate the root cause for the `TextField`. The 
text baseline of `TextField` doesn't change when the height is less than 48 and greater than 40. The problem should be related to the `minContainerHeight` which is 48 by default but the `contentHeight` has become smaller than this min value already. Setting `isDense`/`isCollapsed` to true gives the `minContainerHeight` a smaller number which is 0.0: ff33555b23/packages/flutter/lib/src/material/input_decorator.dart (L1086)

Since [`isDense`](ff33555b23/packages/flutter/lib/src/material/input_decorator.dart (L3907)) is used for the case where the text field has less vertical space, I just use this property in SearchBar.

https://github.com/flutter/flutter/assets/36861262/6ddc8e90-1b47-4dd5-9a57-59b86cafec6d

This is a demo to show the text baseline that doesn't change when we set the text field height under 48.
https://github.com/flutter/flutter/assets/36861262/ce2ee815-f1f5-493a-930e-0540a627bec8
2023-06-02 00:27:22 +00:00
Flutter GitHub Bot
4a8780d228
Roll pub packages (#128053)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-06-02 00:23:16 +00:00
Taha Tesser
513ff44bce
Add FilterChip.elevated, ChoiceChip.elevated, & ActionChip.elevated variants (#128049) 2023-06-01 16:29:28 -07:00
Hans Muller
14136ae319
Updated custom ListTile examples (#128071) 2023-06-01 16:21:42 -07:00
Ben Konyi
35174cc2b7
Fix issue where DevTools would not be immediately available when using --start-paused (#126698)
Service extensions are unable to handle requests when the isolate they were registered on is paused. The DevTools launcher logic was waiting for some service extension invocations to complete before advertising the already active DevTools instance, but when --start-paused was provided these requests would never complete, preventing users from using DevTools to resume the paused isolate.

Fixes https://github.com/flutter/flutter/issues/126691
2023-06-01 22:35:02 +00:00
Kate Lovett
acf5a259e4
Add error message when sliver overlap absorber is missing (#128075)
Adds an error message where we previously would crash without any help.
Came across this while working on https://github.com/flutter/flutter/pull/127718
Fixes https://github.com/flutter/flutter/issues/128074
2023-06-01 22:29:08 +00:00
fzyzcjy
ffe94a2267
Add retry flag to flutter_test (#125851)
Closes https://github.com/flutter/flutter/issues/125920

I will add tests, polish code, etc, if this change looks generally OK!
2023-06-01 22:25:52 +00:00
Christopher Fujino
7f1f765521
[flutter_tools] Use process matcher for multidex test (#127996)
Part of https://github.com/flutter/flutter/issues/127135
Part of https://github.com/flutter/flutter/issues/125115
2023-06-01 22:24:08 +00:00
Hans Muller
1a098ae8eb
Revised Floating Action Button examples (#128058)
Of the original 4 examples, the first 3 mostly covered the same API features and occupied quite a bit of real-estate at the top of https://api.flutter.dev/flutter/material/FloatingActionButton-class.html.  Additionally the illustrations and the code samples didn't match in some cases.

Replaced examples 0,1,2 with one example that changes attributes of the FAB when it's pushed. 

Fixes https://github.com/flutter/flutter/issues/128048
2023-06-01 22:16:48 +00:00
Jonah Williams
47c0454a15
[framework] remove reference to closed issue. (#128007)
Shaders are supported everywhere but HTML backend. We missed this doc update.
2023-06-01 16:16:06 +00:00
Vasiliy Ditsyak
114f05cef6
Add fallback font to IconData class (#127269)
This PR adds an ability to specify `fallbackFont` for `Icon` class via `IconData` props.

Read detailed description here https://github.com/flutter/flutter/issues/126670
2023-06-01 15:43:18 +00:00
Mouad Debbar
764f4cc8c2
[web] Assert route names start with / if using PathUrlStrategy (#127986)
To avoid confusion and unpredictable errors (e.g. https://github.com/flutter/flutter/issues/127462), I'm adding this assert to disallow this pattern.

Fixes https://github.com/flutter/flutter/issues/127462
2023-06-01 15:31:24 +00:00
Andrew Kolos
13db2e4a76
[tool] In flutter doctor -v, warn when Android Studio version could not be detected. (#126395)
Fixes #122081.

When validating an Android Studio installation, add a warning validation message when we are unable to detect the version. This is because we have logic throughout the tool (JDK/JRE-searching) that is at higher risk of failing when we don't know the version.
2023-06-01 14:51:30 +00:00
Tomasz Gucio
2520838afb
Fixes in Cupertino translations (#127872) 2023-06-01 11:17:36 +02:00
Andrew Kolos
06e2b18173
[tools] use Java class for all java-searching behavior (#127354)
Fixes #124252, finishing work on the umbrella tracking issue, #126126.

Essentially, after this PR, no (non-test) code should be be referencing/invoking the java home or binary paths.
2023-06-01 04:19:19 +00:00
Loïc Sharma
071ea49248
[Windows] Address feedback for show window comment (#127998)
Address Tong's feedback here: https://github.com/flutter/flutter/issues/127695#issuecomment-1564884872

Follow-up to: https://github.com/flutter/flutter/pull/127046
2023-05-31 23:42:54 +00:00
Tae Hyung Kim
5596a0cdab
Fix gen-l10n format: true so that it applies to when it gets called via build target (#127886) 2023-05-31 15:25:54 -07:00
Greg Spencer
a257efc284
Fix handling of AppLifecycleState.hidden (#127987)
## Description

This fixes the parsing of `AppLifecycleState` in the services binding so that it knows what it is.

## Related Issues
 - Fixes https://github.com/flutter/flutter/issues/127974

## Tests
 - Added a test that causes parsing of all the different app lifecycle states.
2023-05-31 22:03:06 +00:00
Tae Hyung Kim
5fd9ef4240
Fix SliverPersistentHeader interactions with SliverCrossAxisGroup (#127338)
This PR fixes `SliverCrossAxisGroup` so that once we calculate the total `scrollExtent` of the `SliverCrossAxisGroup`, we ensure that any child sliver is not painted outside of the "scroll extent" of the sliver group.

https://github.com/flutter/flutter/assets/2004742/670dc6f9-a3c6-4bcc-85d3-576cf7f33c6a

https://github.com/flutter/flutter/assets/2004742/0c9cd951-c133-4a8b-9e5e-89d0a69a4f59

Fixes #126958.
Fixes #126957.
2023-05-31 22:01:06 +00:00
Renzo Olivares
83f19be250
Fix bottom sheet rebuilding when tapping (#127526)
This fixes an issue where the bottom sheet would rebuild when `enableDrag` is set to true on every tap. This is because `DragGestureRecognizer` would win the arena by default and dispatch the `drag` callbacks (in `acceptGesture`) even though it had not met the drag threshold. This changes keep the default behavior of `DragGestureRecognizer` the same, but adds a parameter `onlyAcceptDragOnThreshold` that a user can use to stop drag callbacks from being fired when the drag threshold has not been met.

Fixes #126833
2023-05-31 20:21:55 +00:00
Flutter GitHub Bot
347e304ef6
Roll pub packages (#127977)
This PR was generated by `flutter update-packages --force-upgrade`.
2023-05-31 20:18:25 +00:00
hangyu
a829b579d6
Add a FocusSemanticEvent (#126171)
issue: #94523
engine pr: https://github.com/flutter/engine/pull/41777
2023-05-31 20:15:52 +00:00
Mouad Debbar
7eecf8874f
[web] Use PlatformLocation from ui_web (#126851)
Remove the following APIs and export them directly from `dart:ui_web`:
- `urlStrategy` getter and setter
- `HashUrlStrategy`
- `PlatformLocation` and `BrowserPlatformLocation` (keep the façades for non-web platforms)

Depends on https://github.com/flutter/engine/pull/42043
Depends on https://github.com/flutter/engine/pull/42252

Part of https://github.com/flutter/flutter/issues/126831
2023-05-31 17:35:50 +00:00
Tomasz Gucio
ab3602b7df
Use paragraph getter in TextPainter (#127607) 2023-05-31 12:14:16 +02:00
Ian Hickson
1309f977be
Clarify PointerSignalResolver.register (#127605) 2023-05-31 01:54:20 +00:00
Christopher Fujino
0763d61f56
[flutter_tools] manually roll pub deps (#127447)
Fixes https://github.com/flutter/flutter/issues/127226
2023-05-30 23:34:52 +00:00
Tomasz Gucio
1b5899a4c5
Avoid catching FlutterError in TextPainter tests (#127604) 2023-05-30 19:41:08 +02:00
Tomasz Gucio
90afc5e854
Take paint offset into account for Editable children (#127843) 2023-05-30 19:32:10 +02:00
chunhtai
2f521a2143
Increases the eyeballed value of auto scroll velocity scalar (#127410)
A previous pr fixed an bug in the autoscalar's speed calculation. The calculation would produce much lower speed after the fix. This pr raised the default scalar value for reorderable list.

fixes https://github.com/flutter/flutter/issues/121603
2023-05-30 17:28:19 +00:00
Matheus Kirchesch
f1c8723a10
Added option to disable [NavigationRailDestination]s (#127113) 2023-05-30 08:38:05 -07:00
Taha Tesser
918aa9e485
Update Material 2 tests group comment (#127796)
fixes https://github.com/flutter/flutter/issues/127795
2023-05-30 06:15:28 +00:00
Taha Tesser
9bce790162
Updated the ToggleButtons API doc to link to SegmentedButton (#127021)
fixes https://github.com/flutter/flutter/issues/124884
2023-05-27 00:27:19 +00:00
Nate Bosch
0b9cd86546
Remove more test_api/src imports (#127716)
Replace imports of `src/remote_listener.dart` with `backend.dart` which exports `RemoteListener`.

Remove the unused imports of `src/backend/stack_trace_formatter.dart` (no uses of `StackTraceFormatter`) and
`src/backend/suite_channel_manager.dart` (no uses of `SuiteChannelManager`).
2023-05-26 23:47:35 +00:00
LongCatIsLooong
b5df180a6f
Move shared inline widget logic to RenderInlineWidgetContainerDefaults (#127308)
- Added `InlineWidgetContainerDefaults` for deduping inline widget code
- Added a helper function `WidgetSpan.extractFromInlineSpan` for extracting `WidgetSpan`s and automatically applying text scaling (at widget level)
- Removed `TextPainter.inlinePlaceholderScales`. I'm going to deprecate the `scale` argument in `TextPainter.addPlaceholder` next, as scaling is now done at the widget level.
- Added runtime check and comments to make sure nobody is extending `PlaceholderSpan` directly (unfortunately we can't remove `PlaceholderSpan`  without moving RenderEditable and RenderParagraph to the widgets library).
2023-05-26 23:47:33 +00:00
Phil Quitslund
5bf6318688
Update collection-fors to prefer final (as per updated prefer_final_in_for_each) (#127511)
The newly updated lint will soon flag for-each in collections.

See discussion: https://github.com/dart-lang/linter/pull/4383

/cc @goderbauer
2023-05-26 23:34:36 +00:00
Greg Spencer
0da6f04f07
Remove references to deprecated ThemeData.primaryColorBrightness (#127238)
## Description

Removes references to `ThemeData.primaryColorBrightness`, deprecated in https://github.com/flutter/flutter/pull/93396 and subject to remove now because of our [deprecation policy](https://github.com/flutter/flutter/wiki/Tree-hygiene#deprecations).

## Related PRs
 - https://github.com/flutter/flutter/pull/93396

## Tests
 - Removed unneeded tests, removed references.
2023-05-26 22:33:58 +00:00
Kate Lovett
0f1a95d19e
TwoDimensional scrolling foundation (#125437)
From the 2D scrolling proposal: [flutter.dev/go/2D-Foundation](https://flutter.dev/go/2D-Foundation) ✅  updated 4/25

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

Follow up issues:
- https://github.com/flutter/flutter/issues/126297
- https://github.com/flutter/flutter/issues/126298
- https://github.com/flutter/flutter/issues/126299
-  https://github.com/flutter/flutter/issues/122348

This adds a mostly abstract foundation for 2D scrolling in Flutter.

With these base classes, developers will be able to construct widgets that scroll in both dimensions and can lazily load their children for the best performance. This implementation is meant to be flexible in order to support different kinds of 2D compositions, from tables to scatter plots. 

The upcoming TableView, TreeView, etc widgets (coming soon in flutter/packages) are built on top of this foundation.
2023-05-26 22:22:21 +00:00
Qun Cheng
a4de77a239
Remove button announcement for MenuItemButton and SubmenuButton (#127620) 2023-05-26 13:23:45 -07:00
Victoria Ashworth
8e6a9e3a9e
Revert "Log all lines from ios-deploy (#127502)" (#127684)
This reverts commit a19b3436eead2e64bb2b014f14afcd8fab8c9d32.

We added this logging to try and determine if the reason for Dart VM errors (https://github.com/flutter/flutter/issues/121231) was caused by some issue with the streams.
A recent test proves that is not the case:
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20platform_view_ios__start_up/11046/overview
The test shows the Dart VM url in the device log. However, the test log does NOT show a log for the Dart VM url but does show the stack trace, which all come from the main stream, which means it's not an issue with the secondary streams not receiving the log.

So reverting the debugging we added.
2023-05-26 20:11:54 +00:00
Taha Tesser
5d555eb234
Add M3 date range picker tests and fix header background theme color (#127662) 2023-05-26 13:08:45 -07:00
Reid Baker
9376a2ac60
Support minifcation for apps that depend on AGP 8 and integration_test (#127628)
- Set exported proguard rules for consumers of integration_test using AGP 8.0 
- Updated proguard usage in example to test setting custom proguard rules works.

#127388

Documentation for how consumerProguardFiles works. https://developer.android.com/studio/projects/android-library#Considerations

Unknown why we had to use ** instead of matching exactly.
2023-05-26 19:30:44 +00:00
fzyzcjy
c1558f6979
Fix TextField error in production environment because it wrongly uses ancestor render boxes (#126324)
Fixes a crash in a reparented TextField due to frame render phase timing
2023-05-26 10:49:37 -07:00
Jonathan Green
28605398ec
Interactive viewer doesn't appear to respect the trackpadScrollCausesScale parameter (#127114)
Fix a bug when using InteractiveViewer.trackpadScrollCausesScale
2023-05-26 10:45:56 -07:00
LongCatIsLooong
56808b486d
Remove a bad assert from tooltip implementation (#127629)
Fixes https://github.com/flutter/flutter/issues/127575

The `_handleMouseEnter` and `_handleMouseExit` calls are balanced, but the tooltip could be dismissed by an external `PointerDown` event interacting with a different UI component so the ` assert(_activeHoveringPointerDevices.isNotEmpty);` does not really make sense.
2023-05-26 00:29:27 +00:00
LongCatIsLooong
43de3365f5
Remove rounding from TextPainter (#127099)
To opt-in, run the tests with: `SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 flutter test --dart-define=SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 `

Migration plans:
1. Turn the flags on in CI, migrate customer tests if needed
1. Migrate internal customers
2. Remove the flag from skparagraph. Remove the framework flag with a manual engine roll.

Also fixes https://github.com/flutter/flutter/issues/52038
2023-05-26 00:09:51 +00:00
pdblasi-google
07f7ffde50
Adds TestDisplay API for testing Display features (#127525)
* Adds `TestDisplay`
* Updates `TestPlatformDispatcher` to wrap all `Display`s and relate them to their appropriate `TestFlutterView`
* Updates `TestFlutterView` to tie `devicePixelRatio` to its display as per the documentation on `Display`

Closes #127225
2023-05-26 00:04:05 +00:00
Elias Yishak
cb3b1f8c84
ProcessResultMatcher created and used in test (#127414)
Addresses issues:
- https://github.com/flutter/flutter/issues/127135
- https://github.com/flutter/flutter/issues/99767

Creates a matcher class that we can use for `ProcessResult` to check for the exit code.

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

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-05-25 21:20:03 +00:00
Qun Cheng
9fa351807f
SearchBar should not be impacted by overall InputDecorationTheme (#127465) 2023-05-25 12:28:26 -07:00