Commit Graph

13 Commits

Author SHA1 Message Date
Greg Spencer
333c076e53
Factor out RawView, make View listen to engine generated view focus events (#143259)
## Description

This factors out a separate `RawView` that doesn't add a `MediaQuery` or a `FocusScope`. This PR also adds a new method `WidgetsBindingObserver.didChangeViewFocus` which allows the observer to know when the `FlutterView` that has focus has changed.

It also makes the `View` widget a stateful widget that contains a `FocusScope` and ` FocusTraversalGroup` so that it can respond to changes in the focus of the view.

I've also added a new function to `FocusScopeNode` that will allow the scope node itself to be focused, without looking for descendants that could take the focus. This lets the focus be "parked" at the `FocusManager.instance.rootScope` so that nothing else appears to have focus.

## Tests
 - Added tests for the new functionality.
2024-05-20 17:17:55 +00:00
Michael Goderbauer
cff67336d0
Add viewId to PointerEvents (#128287)
Follow-up to https://github.com/flutter/engine/pull/42493.
2023-06-06 19:16:02 -07:00
Michael Goderbauer
dffd0c3a9d
Prefix for dart:ui multiview change (#128152)
For https://github.com/flutter/engine/pull/42493.
2023-06-02 19:08:05 -07: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
pdblasi-google
7dd53fefe9
Reland (3): Removes single window assumptions from flutter_test (#122422)
Reland (3): Removes single window assumptions from `flutter_test`
2023-03-13 21:50:24 +00:00
Casey Hillers
1f42612323
Revert PRs relating to single window assumption (#122369)
* Revert "Remove references to BindingBase.window (#122119)"

This reverts commit c7681f00cf.

* Revert "Remove another reference to BindingBase.window (#122341)"

This reverts commit 6ec4445063.

* Revert "Reland (2): Removes single window assumptions from `flutter_test` (#122233)"

This reverts commit eb3d317ea0.

* Revert "Remove single view assumption from TestViewConfiguration (#122352)"

This reverts commit 927289fb4e.

* Revert "Updates `flutter/test/cupertino` to no longer use `TestWindow` (#122325)"

This reverts commit 67e17e45f0.

* Revert "Updates `flutter/test/gestures` to no longer reference `TestWindow` (#122327)"

This reverts commit c2a5111cc0.

* Revert "Updates `flutter/test/rendering` to no longer use `TestWindow` (#122347)"

This reverts commit 28b65e089b.

* Revert "Updates `flutter_localizations/test` to stop using `TestWindow` (#122321)"

This reverts commit 01367d52d7.
2023-03-09 22:53:38 -08:00
pdblasi-google
eb3d317ea0
Reland (2): Removes single window assumptions from flutter_test (#122233)
Reland (2): Removes single window assumptions from `flutter_test`
2023-03-09 00:52:05 +00:00
Casey Hillers
0091601057
Revert "Reland: Removes single window assumptions from flutter_test (#122060)" (#122193)
Revert "Reland: Removes single window assumptions from `flutter_test`"
2023-03-08 19:42:03 +00:00
pdblasi-google
a626f4db6f
Reland: Removes single window assumptions from flutter_test (#122060)
Reland: Removes single window assumptions from `flutter_test`
2023-03-07 21:12:59 +00:00
pdblasi-google
a53105d941
Revert "Removes single window assumptions from flutter_test (#121549)" (#122037)
This reverts commit f2dd19d5b6.
2023-03-06 11:49:40 -08:00
pdblasi-google
f2dd19d5b6
Removes single window assumptions from flutter_test (#121549)
Removes single window assumptions from `flutter_test`
2023-03-06 18:38:14 +00:00
Alexandre Ardhuin
ccd33631e3
enable combinators_ordering (#107847) 2022-07-18 22:04:07 +00:00
Michael Goderbauer
852bfe2a73
Use BindingBase.platformDispatcher over BindingBase.window where possible (#99443) 2022-03-04 11:11:07 -08:00