This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213)
No changes from original, except for finding the right RenderBox in dev/integration_tests/android_semantics_testing/test_driver/main_test.dart.
* Add repeatCount to RawKeyEventDataAndroid
Adds a new field to RawKeyEventDataAndroid and sets it to the value
passed from the engine. It is the value returned by
KeyEvent.getRepeatCount(). This allows us to differentiate between
events generated by a new keypress and repeated events when a key is
held down.
* Add test for RawKeyEventDataAndroid.repeatCount
The flake appears to be coming from the Google Maps plugin. This test
just needs a platform view plugin without the interface method
implemented in general, not Maps specifically. Update it here to avoid
the issue in Maps until that's fixed.
Create a very simple platform view implementation that exercises this
potential bug in order to create a minimal test case with less risk of
causing second order issues like depending on any kind of full package
would cause.
This attempts to reland #40186 and #41220, that were reverted in #41945.
The main modifications from the original PRs are that I predefine the shortcuts and actions maps instead of defining them inline in the build function, and I use a new mapEquals to do a deep comparison so that we don't rebuild modified things if the contents of the map haven't changed.
I also eliminated an operator== and hashCode that were defined on the Actions widget, since widgets shouldn't have those. (it's too bad though: I get an 85% speedup if we leave this in! Too bad it prevents rebuilding of the children...)
Fixes#40101
1. The platform code to show the keyboard wasn't working on certain
devices. From my testing it appears to be related to when the code was
firing. IMM won't show the soft input (or shows and then immediately
hides it, it's hard to tell) if it's called before the Flutter UI is
loaded. Change this to instead show the soft keyboard after a message
from Flutter that main() has been started.
2. A text field was visible in the UI, and the test was run under a
fuzzer that random tapped portions of the screen. Remove the text field
so that the fuzzer can't accidentally open the keyboard on its own at a
random time.
3. The keyboard was left open even after the app was closed. Also toggle
the input off when the app was closed, so that this test can be ran
multiple times in succession relatively hermetically.
* Add smoke test for the new Android embedding
* Update AndroidManifest.xml in app template
* Update test README.md
* Remove widget_test.dart
* Update pubspec.yaml
* Force GeneratedPluginRegistrant.java
This adds the default shortcuts and actions for keyboard-based focus traversal of apps.
This list of shortcuts includes shortcuts for TAB, SHIFT TAB, RIGHT_ARROW, LEFT_ARROW, UP_ARROW, DOWN_ARROW, and the four DPAD keys for game controllers (because the DPAD produces arrow key events).
It doesn't yet include functionality for triggering a control (e.g. SPACE, ENTER, or controller buttons), because that involves restructuring some of the Flutter controls to trigger animations differently, and so will be done in another PR (#41220)
This reverts c9d920f so that we can attempt to fix the build. The build dashboard clearly shows that things started failing at this change, although it's not totally clear that it is the cause: tests succeed locally.
If it doesn't fix things we can re-land this.
* Stop using build_runner for dart2js
* fixes to yield when computing hashes and to imports
* add missing await
* Update filecache_test.dart
* Fix paths in filecache test
* use file uri for import
* add test cases and configurable override
* remove test dep
* fix filepaths for windows
* test no longer failing
* fix paths for test cases
* fix typo
* address comments
* make a constant
* make filehash async and use constant
* fix silly logic error
Spawn no more than 1 iframe in web tests. Using multiple iframes in DDK mode times out tests. Also set concurrency to 1 to guarantee that the test runner does not even attempt to parallelize tests.
This reverts commit baea9bf7cc.
Additionally, we let the test run on mac8 with iphonexs because the test won't run on Xcode 10.1 (mac3-7). Hence we force it to run on mac8 which currently has Xcode 10.2.
This re-lands #41417 with a slight change that will hopefully not tickle the analyzer as it did before. The last time I tried to land this, the analyzer succeeded for the analyze step in Cirrus, and locally, but failed in an integration test.
Before this change, having an Android app depend on a plugin that has no android implementation resulted in a Gradle build failure.
This scenario is likely to become more common if we're enabling federated plugins, as the package implementing just the desktop implementation of a plugin won't have an Android implementation.
This changes the Gradle plugin to not try to build any plugins that doesn't have an android/build.gradle file.
This updates the keyboard maps to use updated HID codes for game controller buttons (from Chrome), and to encode that GLFW "super" keys are what we call "meta" keys (i.e. Windows key or Command key).
This reverts commit af9f424d5d.
Reverts flutter/flutter#39439
Reason: this passed the local device lab test on my Macbook but it failed in the actual device lab. Will investigate, fix, and reland.
TBR: @dnfield @goderbauer @tvolkert @Hixie
For https://github.com/flutter/flutter/issues/33899
Test added:
- simple_animation_perf_ios
Test modified:
- backdrop_filter_perf_ios__timeline_summary
We'll add the CPU/GPU measurement to more iOS tests
once it's proven to be non-flaky.
* WIP on web plugin registry
* WIP on registering plugins
* WIP on web plugin registration
* Only generate `package:flutter_web_plugins` imports if plugins are
defined
* Add parsing test
* Add documentation
* Fix analyzer warnings
* add license headers
* Add tests for package:flutter_web_plugins
* Run `flutter update-packages --force-upgrade`
* Fix analyzer errors
* Fix analyzer error in test
* Update copyright and remove flutter SDK constraints
* Enable tests since engine has rolled
* add flutter_web_plugins tests to bots
* Create an empty .packages file for WebFs test
One of our linux/android Moto G4 has alerts (emergency, amber, etc.)
turned on. That's probably the cause of the flakiness. I've turned it
off.
Let's mark this as non-flaky and see if it's fixed. If not, I'll move it
to mac/android and see if that fixes the flakiness.
I think the most important thing to do right now is to mark it as
non-flaky so those who really break the test could get a notification.
* Moved the default BinaryMessenger instance to ServicesBinding
This reverts commit 821602aef3.
* Added assertion in defaultBinaryMessenger. Also fixed the devicelab tests.
Flutter widget tests assert if a test completes with timers still
pending. However, it can be hard to diagnose where a pending timer
came from. For example, a widget might consume a third-party library
that internally uses a timer.
I added a FakeAsync.pendingTimersDebugInfo getter to quiver
(https://github.com/google/quiver-dart/pull/500). Make flutter_test
use it.
Additionally modify Flutter's debugPrintStack to take an optional
StackTrace argument instead of always printing StackTrace.current.
Fixes#4237.
* Add an 'unfocusable' focus node to allow developers to indicate when they don't want a Focus widget to be active
* more unfocusable changes. not working.
* Switch to focusable attribute
* Rename to canRequestFocus
* Turn off debug output
* Update docs
* Removed unused import
In another change (#37646), I want to test that a test fails and
prints expected output. I didn't see an existing way to do that, so
I modified `_runFlutterTest` and `runCommand` to allow capturing the
output. Currently capturing and printing output are mutually
exclusive since we don't need both.
Some awkward bits:
* There already exists a `runAndGetStdout` function that is very
similar to `runCommand`, and this change makes the conceptual
distinction more confusing.
* `runFlutterTest` has multiple code paths for different
configurations. I don't understand what the different paths are
for, and I added output checking only along one of them.
* Add a test for a directory instead of a single test.
* Add test data to a child directory to test the command.
* Add test data to a child directory to test the command.
* Add test data to a child directory to test the command.
* Correct test.
This reverts commit 92ef2b9ce1.
This requires either runApp() or
WidgetsFlutterBinding.ensureInitialized() to have been called before
using any MethodChannels. Plugins broadly rely on MethodChannels and
right now there's no general requirements that they be constructed
within the runApp call, so the ecosystem breakages from this are broader
than originally thought. Reverting for now.
- Splits on{Enter,Hover,Exit} from Listener to MouseRegion. Deprecated API is kept for compatibility.
- Splits on{Enter,Hover,Exit} from RenderPointerListener to RenderMouseRegion.
This relands https://github.com/flutter/flutter/pull/35297
The followings have been done to fix the broken tests:
1. Add `didSendFirstFrameRasterizedEvent` extension and its tests
2. Wait for `didSendFirstFrameRasterizedEvent` instead of
`didSendFirstFrameEvent` during start up tests
3. Mark missed (probably newly added) start up tests as flaky
`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}
`flutter build aar`
This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.
This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.
This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.
`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.
In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:
repositories {
maven {
url "<path-to-flutter-module>build/host/outputs/repo"
}
}
dependencies {
implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
transitive = true
}
}