- 20 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
-
- 18 Jan, 2023 1 commit
-
-
Bruno Leroux authored
* Fix focus area documentation typos * Restore intentional spaces that illustrate bigger buttons
-
- 31 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 17 Oct, 2022 1 commit
-
-
Greg Spencer authored
-
- 17 Aug, 2022 1 commit
-
-
Greg Spencer authored
-
- 19 Jul, 2022 1 commit
-
-
Tong Mu authored
-
- 15 Jun, 2022 1 commit
-
-
Tong Mu authored
Allow DoNothingIntent and DoNothingAndStopPropagationIntent to be used in a const environment (#105983)
-
- 25 May, 2022 3 commits
-
-
Greg Spencer authored
This removes Shorcuts.of and Shortctus.maybeOf because they're not especially useful, since the only thing you can really set on a ShortcutManager is the shortcuts, and the Shortcuts widget that you give it to manages those, so if it rebuilds, it overwrites what you set. Also, adds a Shortcuts.manager constructor and removes the manager argument to the Shortcuts widget. Removing these will also eliminate an InheritedWidget for each Shortcuts widget, improving memory usage.
-
Michael Goderbauer authored
-
Greg Spencer authored
A bunch of random cleanup things I found while doing MenuBar development. Changes an if test to an assert in binding.dart, since the if should always be true. Adds the default ShortcutRegistrar that should have been in the ShortcutRegistry PR. Moves a debug message in the FocusManager to print the result after the focus change instead of before. Reorders the test parameters in theme_data_test.dart to match the order of the theme data fields everywhere else.
-
- 19 May, 2022 1 commit
-
-
Greg Spencer authored
This adds a ShortcutsRegistry for ShortcutActivator to Intent mappings that can be modified from its descendants. This is so that descendants can make shortcuts dynamically available to a larger portion of the app than just their descendants. This is a precursor needed by the new MenuBar, for instance, so that the menu bar itself can be placed where it likes, but the shortcuts it defines can be in effect for most, if not all, of the UI surface in the app. For example, the "Ctrl-Q" quit binding would need to work even if the focused widget wasn't a child of the MenuBar. This just provides the shortcut to intent mapping, the actions activated by the intent are described in the context where they make sense. For example, defining a "Ctrl-C" shortcut mapped to a "CopyIntent" should perform different functions if it happens while a TextField has focus vs when a drawing has focus, so those different areas would need to define different actions mapped to "CopyIntent". A hypothetical "QuitIntent" would probably be active for the entire app, so would be mapped in an Actions widget near the top of the hierarchy.
-
- 14 Apr, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 30 Mar, 2022 1 commit
-
-
Greg Spencer authored
-
- 07 Jan, 2022 1 commit
-
-
Tong Mu authored
-
- 14 Dec, 2021 1 commit
-
-
Sam Rawlins authored
-
- 17 Nov, 2021 1 commit
-
-
Greg Spencer authored
-
- 29 Jul, 2021 1 commit
-
-
Tong Mu authored
-
- 28 Jul, 2021 1 commit
-
- 26 Jul, 2021 1 commit
-
-
Tong Mu authored
-
- 09 Jul, 2021 1 commit
-
-
Greg Spencer authored
-
- 19 May, 2021 1 commit
-
-
Tong Mu authored
-
- 14 May, 2021 1 commit
-
-
Abhishek Ghaskata authored
-
- 28 Apr, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 15 Apr, 2021 1 commit
-
-
Tong Mu authored
This PR introduced a new class, ShortcutActivator, and refactored the the definition and lookup system of shortcuts, in order to solve a few issues of the previous algorithm.
-
- 14 Apr, 2021 1 commit
-
-
Greg Spencer authored
This allows the key handling code in the shortcut manager to function when there is a null primaryFocus. The primary focus can be null only in some special circumstances (e.g. when an app hasn't set any focus at all), but that shouldn't cause a crash.
-
- 28 Mar, 2021 1 commit
-
-
Tong Mu authored
-
- 27 Mar, 2021 1 commit
-
-
Tong Mu authored
-
- 25 Mar, 2021 1 commit
-
-
Michael Goderbauer authored
-
- 24 Mar, 2021 2 commits
-
-
Tong Mu authored
- Remove `LogicalKeyboardKey.keyLabel` - Make `Physical/LogicalKeyboardKey.debugName` getters - Make `Physical/LogicalKeyboardKey()` factory constructors, which cache non-predefined instances.
- 04 Mar, 2021 1 commit
-
-
Greg Spencer authored
-
- 17 Feb, 2021 1 commit
-
-
Sam Rawlins authored
-
- 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
-