21978 Commits

Author SHA1 Message Date
Kostia Sokolovskyi
cc41e25f21
_RenderSnapshotWidget should dispose created OffsetLayer. (#136267) 2023-10-11 08:45:39 -07:00
Taha Tesser
692d7ade9e
Fix FlexibleSpaceBar does compositing with near zero opacity. (#136255)
fixes [`flexible_space_bar.dart': Failed assertion: line 475 pos 12: 'needsCompositing': is not true.` is thrown when scrolling down in the list and then up](https://github.com/flutter/flutter/issues/135698)
2023-10-11 07:19:30 +00:00
Polina Cherkasova
ad05949971
Fix flakiness: finalize dropped gestures in tests to release resources, and update doc-comment. (#136136) 2023-10-10 18:11:23 -07:00
Valentin Vignal
b989428fa2
Add SizeTransition.fixedCrossAxisSizeFactor (#134659)
Fixes https://github.com/flutter/flutter/issues/134654
2023-10-11 00:53:34 +00:00
Matan Lurey
f38244f0b5
Relaxed a test on Paint.toString() to ignore dither: .... (#136302)
Work towards https://github.com/flutter/flutter/issues/112498.

Behaviorally the same, except doesn't care if `dither: ...` shows up, or
not (it won't when https://github.com/flutter/flutter/issues/112498 is
fixed).
2023-10-10 17:50:35 -07:00
Greg Spencer
7e1d366a4d
Add key event handlers that happen before or after the focus traversal (#136280)
## Description

This adds a mechanism for listening to key events before or after focus traversal occurs.

It adds four methods to the public `FocusManager` API:

- `addEarlyKeyEventHandler` - Adds a handler that can handle events before they are given to the focus tree for handling.
- `removeEarlyKeyEventHandler` - Removes an early event handler.
- `addLateKeyEventHandler` - Adds a handler that can handle events if they have not been handled by anything in the focus tree.
- `removeLateKeyEventHandler` - Removes a late event handler.

This allows an app to get notified for a key anywhere, and prevent the focus tree from seeing that event if it handles it.

For the menu system, this allows it to eat an escape key press and close all the open menus.

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

## Tests
 - Added tests for new functionality.
2023-10-10 23:16:25 +00:00
Christopher Fujino
b416473bbb
[flutter_tools] catch StdinException when setting terminal to SingleCharMode (#136283)
Fixes https://github.com/flutter/flutter/issues/129198
2023-10-10 23:10:29 +00:00
Camille Simon
54cf286e1a
[Android] Update Java/AGP/Gradle warning compatible Java range (#135710)
Specifies that compatible Java range stated in warning when Java version is incompatible with our template AGP & Gradle versions notes an exclusive upper bound Java version. This was a bug from https://github.com/flutter/flutter/pull/131444, and I will file a CP request to stable once this lands.

The warning uses [`getJavaVersionFor`](b5c8fd11e4/packages/flutter_tools/lib/src/android/gradle_utils.dart (L606)), which returns an exclusive upper bound, which is why this fix is necessary.
2023-10-10 22:30:50 +00:00
Jonah Williams
a106b81cc5
[framework] restore old zoom page transition for benchmarking. (#133346)
In the past I switched the implementation of the zoom page transition because the performance of the old transition was terrible, but I'm hopeful that with Impeller we'll be able to identify and fix the issues that made it so slow. In order to evaluate this though, we need to be able to opt into the old transition for benchmarks on CI.

https://github.com/flutter/flutter/issues/129742
https://github.com/flutter/flutter/issues/121325
2023-10-10 22:27:07 +00:00
Mitchell Goodwin
daa52b2501
Seperate localization tests for Material2 and Material3 (#135779)
Seperates tests for the localizations package into Material2 and Material3 versions and removes dependency on theme.

More info in #127064
2023-10-10 21:46:20 +00:00
Christopher Fujino
0fa01b2156
[flutter_tools] allow tool integration tests to quit on SIGINT (#136271)
fixes https://github.com/flutter/flutter/issues/136270
2023-10-10 20:47:59 +00:00
Kostia Sokolovskyi
0a6947049b
TimePickerDialog should dispose created ChangeNotifiers. (#136261) 2023-10-10 11:05:26 -07:00
Kostia Sokolovskyi
5064f782c1
Cover more test/material tests with leak tracking. (#136093) 2023-10-10 10:05:51 -07:00
Kostia Sokolovskyi
5d9983a125
RenderAnnotatedRegion should dispose created layers. (#136086) 2023-10-10 08:32:01 -07:00
Polina Cherkasova
eec3f06090
TestClipPaintingContext should dispose ContainerLayer (#135949) 2023-10-10 08:19:50 -07:00
droidbg
67170b1254
[leak-tracking] Add leak tracking in test/painting #1 (#136167) 2023-10-09 13:10:07 -07:00
droidbg
3df6078bc4
[leak-tracking] Cover testwidgets with leak tracking in test/gestures (#136166) 2023-10-09 13:09:24 -07:00
Hassan
e127f7191b
[web] Fix page up page down home end shortcut behavior on web (#135454)
We delegate page up / page down actions to the browser. However, we don't let the browser scroll the underlying `<textarea>` - the framework handles scrolling, so page up/down don't end up doing anything. Since the framework handles scrolling for text inputs and textareas, we should let it also handle the actions for `page up`, `page down`, `home`, `end`, and their modifiers. 

fixes https://github.com/flutter/flutter/issues/121867
2023-10-09 17:50:54 +00:00
Greg Spencer
a5e3e78591
Update MediaQuery documentation to highlight asynchronous nature of size (#135719)
## Description

This updates the documentation for `MediaQuery` and `Overlay` to include the following:

- That `MediaQueryData.size` is set asynchronously, and doesn't necessarily reflect the size of the current frame.
- That the specific `MediaQuery.sizeOf` and related methods are preferred over the more generic `MediaQuery.of`.
- That the size of the `Overlay` isn't necessarily the size returned by `MediaQueryData.size`

As well as adding some symbol links, and fixing some error in documentation.

## Tests
 - Documentation only
2023-10-09 16:55:09 +00:00
chunhtai
ff73448f33
Reland "Adds a parent scope TraversalEdgeBehavior and fixes modal rou… (#134554)
…… (#134550)"

fixes https://github.com/flutter/flutter/issues/112567

This reverts commit 5900c4baa751aff8f05e820287a02b60cdd62dfa.

The internal test needs migration. cl/564746935

This is the same of original pr, no new change

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] 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, or this PR is
[test-exempt].
- [ ] 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-10-09 09:10:23 -07:00
droidbg
f52fe4f7e5
[leak-tracking] Add leak tracking in test/painting #2 (#136169) 2023-10-09 07:22:29 -07:00
Taha Tesser
9ab091f92b
Update CircleAvatar & DataTable tests for Material 3 (#135901)
Updated unit tests for `CircleAvatar` & `DataTable` to have M2 and M3 versions.

More info in #127064
2023-10-09 10:05:28 +00:00
Bruno Leroux
a6d712497d
Update BottomSheet test for M3 + fix an issue in elevation resolution (#136071)
This PR updates unit tests from bottom sheet tests for M3 migration.

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

It also contains in bottom_sheet.dart where a default value took precedence over a theme attribute.
2023-10-09 06:31:49 +00:00
Polina Cherkasova
74f8b4f777
Allow leaks around tap down/up, while flackiness is not fixed. (#136133) 2023-10-07 11:22:53 -07:00
Chris Bobbe
a88a2503ae
bottom_sheet: Clarify doc about behavior when useSafeArea is false (#134793)
As discussed at https://github.com/flutter/flutter/pull/122225#issuecomment-1690729628, this is a docs change meant to help people in the absence of a fix for #121752, which is being closed as WONTFIX.
2023-10-07 02:45:24 +00:00
Mateus Felipe C. C. Pinto
dcd24ef0fa
Simplify assertion in AsyncSnapshot (#135899)
Simplify assertion in `AsyncSnapshot`.

Fixes #135731.
2023-10-07 00:58:05 +00:00
LongCatIsLooong
ebe72d3f32
Call markNeedsPaint when adding overlayChild to Overlay (#135941)
Fixes https://github.com/flutter/flutter/issues/134656

`_skipMarkNeesLayout` was meant to only skip `markNeedsLayout` calls. Re-painting is still needed when a child gets added/removed from the `Overlay`.
2023-10-06 22:12:20 +00:00
Polina Cherkasova
f0970365ca
RenderEditable should dispose created layers. (#135942) 2023-10-06 12:30:20 -06:00
Kostia Sokolovskyi
d76e3abf10
Fix memory leaks in DateRangePickerDialog. (#136034)
This PR mainly fixes several memory leaks in the `DateRangePickerDialog`.

### Description
- Fixes https://github.com/flutter/flutter/issues/136033 by:
    1) adding a disposal of several `RestorableValue`;
    2) creating a separate `_DayItem` stateful widget that creates/updates/disposes internal `MaterialStatesController`.
- Marks https://github.com/flutter/flutter/issues/136036.

### Tests
- Updates `test/material/date_picker_theme_test.dart` to use `testWidgetsWithLeakTracking`;
- Updates `test/material/date_range_picker_test.dart` to use `testWidgetsWithLeakTracking`.
2023-10-06 11:26:06 +00:00
fzyzcjy
7b0293d663
Tiny improve code style by using records instead of lists (#135886) 2023-10-06 08:31:13 +02:00
Daco Harkes
daec612571
Bump dart-lang/native deps (#135905)
Bump dart-lang/native deps.

* https://github.com/dart-lang/native/issues/142
2023-10-04 02:35:20 +00:00
Matthias Ngeo
8bd5434853
Replace dead link in CupertinoPicker documentation (#135897)
This PR is a trivial change that replaces a dead link in `CupertinoPicker`'s [documentation](https://api.flutter.dev/flutter/cupertino/CupertinoPicker-class.html).
2023-10-03 20:20:06 +00:00
LongCatIsLooong
4581399a3c
Remove unused InlineSpan methods (#135882) 2023-10-03 17:37:49 +00:00
林洵锋
047bd6cebd
Fix the character field of RawKeyEvent is always null on iOS (#135100)
Fixes https://github.com/flutter/flutter/issues/133956
2023-10-03 05:26:41 +00:00
derdilla
1437aa2c7b
Cover some cupertino tests with leak tracking (#135230) 2023-10-02 17:44:50 -06:00
derdilla
397da0649a
leak track tab_scaffold_test.dart (#135309) 2023-10-02 17:39:47 -06:00
Kostia Sokolovskyi
ff68b62599
Fix a couple of CupertinoTextField tests to avoid leak-tracking test failures. (#135851) 2023-10-02 15:29:37 -06:00
Mitchell Goodwin
57ed724177
Update dialog tests for Material3 (#135775)
Separates the tests for the Material dialog into Material3 and Material2 versions.

More info in #127064
2023-10-02 11:03:18 +00:00
derdilla
783672588b
Test cover cupertino text field for memory leaks. (#135804) 2023-10-01 19:41:59 -07:00
Kostia Sokolovskyi
cfe7afdc50
Fix memory leaks in WidgetInspector and WidgetInspectorService. (#135828) 2023-10-01 19:41:46 -07:00
derdilla
71acf24201
leak track page_test.dart (#135352) 2023-10-01 16:45:02 -07:00
derdilla
994f71c267
Leak track cupertino widgets (#135353) 2023-10-01 16:42:45 -07:00
Kostia Sokolovskyi
95eae5f967
Cover more test/widgets tests with leak tracking #12. (#135385) 2023-09-29 17:47:04 -07:00
Kostia Sokolovskyi
fdde24195f
DraggableScrollableController should dispatch creation in constructor. (#135423) 2023-09-29 17:45:35 -07:00
Kostia Sokolovskyi
a11b21dba8
ViewportOffset should dispatch creation in constructor. (#135420) 2023-09-29 14:08:39 -07:00
Jackson Gardner
9f4f6c4756
Use platform dill from the engine when compiling with dart2wasm. (#134970)
This is the final change needed to address https://github.com/flutter/flutter/issues/133467

This allows us to use the platform dill that is built by the engine when compiling apps. This also fixes the `--local-web-sdk` flag when compiling to wasm (which previously didn't work without some serious tweaking of the engine build output).
2023-09-29 20:21:24 +00:00
Polina Cherkasova
9d9f213eed
Upgrade leak_tracker to fix flackiness. (#135760)
Fixes: https://github.com/flutter/flutter/issues/135716
leak_tracker is left pinned because future updates are going to be breaking.
2023-09-29 18:55:21 +00:00
Taha Tesser
ebaf160391
Update Drawer tests for M2/M3 (#135752)
Updated unit tests for `Drawer` to have M2 and M3 versions.

More info in #127064
2023-09-29 18:15:53 +00:00
Kate Lovett
7c9feea835
Expose onAttach and onDetach in ScrollController subclasses (#135721)
Fixes https://github.com/flutter/flutter/issues/135574
This exposes the onAttach and onDetach callbacks of ScrollController in all of its subclasses.
2023-09-29 17:47:36 +00:00
Jackson Gardner
0f947a09ed
Update the wasm bootstrap to allow access to the emscripten wrapper to skwasm. (#135723)
Some upcoming engine changes will bind to a function provided by the emscripten JS wrapper around skwasm, rather than just the wasm module itself. This will make sure not to break the benchmarks when those engine changes land. See https://github.com/flutter/engine/pull/46388
2023-09-29 17:41:45 +00:00