This fixes the sample code analysis to treat dartpad snippets in the same way as snippet snippets, which it wasn't until now (the snippet generator was treating them as "samples"), and some errors crept in. This PR also fixes those errors.
Also, added a --verbose option to the sample analyzer.
I updated the build files for manual_tests, as well as adding in a macos and web directory to allow the manual tests to be run on the web or on desktop.
The main change here are the parts that I added to the files in manual_tests/lib/... (the addition of kIsWeb to "if (!kIsWeb && Platform.isMacOS) {") The rest is just an update of the auto-generated code from flutter create.
* Sort Localization generation output
- When creating locales that were assumed from existing locales, the
file that is used is non-deterministic. This adds a sort to the iterator
to ensure that the same existing locale is used to generate the assumed
locale
- When generating material, cupertino and date localizations, the generated getters were not sorted. This
introduces an alphabetic sort
* remove main.dart.snapshot
* Add check for placeholders being an empty map
* Remove unnecessary properties from en_ES.arb in the stocks example
* Use getter instead of methods in the stocks example
* Fixed "annotating types for function expression parameters" lint issue from generated localizations delegate code
This adds support for the fn key on macOS. It adds it to the key mappings as a supplemental mapping that overwrites the one from the Chrome headers, since the chrome headers have a TODO, but no implementation of the key.
Also, ignore the fn key entirely on macOS. This is because On macOS laptop keyboards, the fn key is used to generate home/end and f1-f12, but it ALSO generates a separate down/up event for the fn key itself. Other platforms hide the fn key, and just produce the key that it is combined with, so to keep it possible to write cross platform code that looks at which keys are pressed, the fn key is ignored.
Removes multiple re-entrant calls of bundle and aot and replaces them with a single call to assemble. This restores full caching and will allow follow-up performance improvements when building multiple ABIs
*Starting with arb files in lib/l10n, the tool creates the following by default:
1. An AppLocalizations class containing:
- an `AppLocalizationsDelegate`
- a `supportedLocales` property that returns a list of all supported locales.
- a `localizationsDelegate` property that returns a list containing this delegate along with `GlobalMaterialLocalizations.delegate`, `GlobalCupertinoLocalizations.delegate`, and `GlobalWidgetsLocalizations.delegate`.
2. One Dart `message_<locale>.dart` file for each arb file, as well as a `messages_all.dart` file that performs the locale message lookup. The tool infers the locale of each arb file from the @@Locale property or the arb file's name.
This adds accessors for WidgetsBinding.instance.focusManager and WidgetsBinding.instance.focusManager.primaryFocus so that they can be more easily found in IDEs and accessed.
This adds a top level getter for WidgetsBinding.instance.focusManager.primaryFocus called primaryFocus, and a static accessor FocusManager.instance that returns WidgetsBinding.instance.focusManager.
This re-lands the change that adds focus nodes, hover, and shortcuts to switches, checkboxes, and radio buttons. (#43213), with fixes for the web tests that weren't enabled in the master that it was synced to when I first landed it.
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