- 05 Jan, 2021 1 commit
-
-
Kate Lovett authored
-
- 29 Oct, 2020 1 commit
-
-
Greg Spencer authored
This removes the nullOk parameter from Shortcuts.of, Actions.find and Actions.handler and created Shortcuts.maybeOf and Actions.maybeFind. Shortcuts.of and Actions.find now return non-nullable values, and the maybe versions return a nullable value. I didn't create a non-nullable version of Actions.handler, since it needs to be able to return null if an action is not enabled, but I did remove the nullOk parameter, effectively setting it to true permanently, since setting it to false doesn't make much sense if the function can still return null when the action is not enabled.
-
- 19 Oct, 2020 1 commit
-
-
Greg Spencer authored
- - When I added notification of key events before processing them as text, it made it so that shortcut key bindings like the spacebar would prevent spaces from being inserted into text fields, which is obviously not desirable (and so that change was reverted). At the same time, we do want to make it possible to override key events so that they can do things like intercept a tab key or arrow keys that change the focus. This PR changes the behavior of the Shortcuts widget so that if it has a shortcut defined, but no action is bound to the intent, then instead of responding that the key is "handled", it responds as if nothing handled it. This allows the engine to continue to process the key as text entry. This PR includes: - Modification of the callback type for key handlers to return a KeyEventResult instead of a bool, so that we can return more information (i.e. the extra state of "stop propagation"). - Modification of the ActionDispatcher.invokeAction contract to require that Action.isEnabled return true before calling it. It will now assert if the action isn't enabled when invokeAction is called. This is to allow optimization of the number of calls to isEnabled, since the shortcuts widget now wants to know if the action was enabled before deciding to either handle the key or to return ignored. - Modification to ShortcutManager.handleKeypress to return KeyEventResult.ignored for keys which don't have an enabled action associated with them. - Adds an attribute to DoNothingAction that allows it to mark a key as not handled, even though it does have an action associated with it. This will allow disabling of a shortcut for a subtree.
-
- 15 Oct, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 03 Jun, 2020 1 commit
-
-
Greg Spencer authored
-
- 07 Apr, 2020 1 commit
-
-
Greg Spencer authored
This updates the Action API in accordance with the design doc for the changes: flutter.dev/go/actions-and-shortcuts-design-revision Fixes #53276
-
- 06 Apr, 2020 1 commit
-
-
Alexandre Ardhuin authored
-
- 20 Mar, 2020 1 commit
-
-
Yegor authored
fix KeySet.hashCode; enable multiple web tests
-
- 30 Jan, 2020 1 commit
-
-
Greg Spencer authored
This PR fixes #49647 by changing DiagnosticableMixin.toDiagnosticsNode and other things to accept DiagnosticableMixin instead of requiring Diagnosticable.
-
- 13 Jan, 2020 1 commit
-
-
Ian Hickson authored
-
- 09 Jan, 2020 1 commit
-
-
Greg Spencer authored
This simplifies the diagnostic output for the Shortcuts widget so that if a debugLabel is supplied, then that is printed instead of the full list of shortcut keys in the map. Also, the output of the shortcut map is simplified to have the list of keys presented in more readable text.
-
- 27 Nov, 2019 1 commit
-
-
Ian Hickson authored
* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
-
- 30 Sep, 2019 1 commit
-
-
Alexandre Ardhuin authored
* add missing trailing commas * add more missing trailing commas * add more and more missing trailing commas
-
- 28 Sep, 2019 1 commit
-
-
Greg Spencer authored
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.
-
- 27 Sep, 2019 2 commits
-
-
Greg Spencer authored
This reverts commit eb3e2f55 because of a suspected analyzer bug. Reverting to investigate.
-
Greg Spencer authored
This addresses comments in the original PR (#41245) that introduced Intent.doNothing, adds tests, and fixes an issue with it.
-
- 24 Sep, 2019 2 commits
-
-
Alexandre Ardhuin authored
-
Greg Spencer authored
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms. This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
-
- 23 Aug, 2019 1 commit
-
-
Greg Spencer authored
This fixes the hashCode calculation for KeySet<T> so that it doesn't depend on the insertion order of the keys in the set. The fix involves switching from Set<T> to HashSet<T> internally, so that the iteration order is stable around the hash values of the inserted keys, and not the insertion order. This matters when hashList is called in KeySet<T>.hashCode to build the hash value of the contents of the internal set. Fixes #38919
-
- 21 Aug, 2019 1 commit
-
- 09 Aug, 2019 2 commits
-
-
Michael Klimushyn authored
This reverts commit 92ef2b9c. 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.
-
adazh authored
-
- 06 Jun, 2019 1 commit
-
-
Greg Spencer authored
This fixes a rather embarrassing bug in ShortcutManager that happened because I forgot to add the tests I meant to add. This fixes the bug, and adds the tests.
-
- 04 Jun, 2019 1 commit
-
-
Greg Spencer authored
This implements the keyboard shortcut handling and action invocation in order to provide a place in the infrastructure for keyboard events to trigger actions. This will allow binding of key events to actions like "move the focus to the next widget" and "activate button".
-