- 28 Apr, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 26 Apr, 2021 1 commit
-
-
Tong Mu authored
Applies #78522 to existing code, by replacing all occurrences of LogicalKeySet to SingleActivator or ShortcutActivator.
-
- 07 Apr, 2021 1 commit
-
-
Sam Rawlins authored
-
- 17 Mar, 2021 1 commit
-
-
William Oprandi authored
-
- 04 Mar, 2021 2 commits
-
-
Michael Goderbauer authored
-
Greg Spencer authored
-
- 26 Jan, 2021 1 commit
-
-
Greg Spencer authored
This removes the nullOk parameter from Actions.invoke, and adds an Actions.maybeInvoke function. The difference is that invoke will now always (in debug mode) throw if an enabled action isn't found, and maybeInvoke will return null if an enabled action isn't found. The invoke function can still return null as the result of the invocation, though, so I purposely didn't change the return value to Object from Object?.
-
- 13 Nov, 2020 1 commit
-
-
Greg Spencer authored
Change the semantics of Actions.invoke so that if the action it finds is disabled, then it keeps looking for an ancestor Actions widgets that has a matching intent where the action is not disabled.
-
- 12 Nov, 2020 1 commit
-
-
Michael Goderbauer 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.
-
- 07 Oct, 2020 1 commit
-
-
Darren Austin authored
Migrate framework tests for rendering, semantics, widgets to null safety.
-
- 23 Jul, 2020 1 commit
-
-
Todd Volkert authored
The boolean value as to whether the action was found and enabled is less useful than just returning the result of invoking the action itself.
-
- 09 Jul, 2020 1 commit
-
-
Kate Lovett authored
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 29 May, 2020 1 commit
-
-
Greg Spencer authored
This makes the callback arguments to FocusableActionDetector optional, if you (for instance) only want to define shortcuts and actions and a focus node for something.
-
- 28 May, 2020 1 commit
-
-
Tong Mu authored
* Adds default cursor and/or mouseCursor property to a number of widgets. * Adds `MaterialStateMouseCurrsor`.
-
- 27 May, 2020 1 commit
-
-
Greg Spencer authored
This adds a new navigationMode to the MediaQueryData that indicates how focusable controls should behave under different navigation modes, currently with two modes: NavigationMode.traditional, and NavigationMode.directional. It may seem like focusing a disabled control is not desirable, but this is useful for user interfaces that use DPAD navigation because if a control gets disabled, losing focus is disruptive to the user, and it is difficult to control where the focus will end up unless it is done explicitly.
-
- 21 Apr, 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
-
- 11 Feb, 2020 1 commit
-
-
Alexandre Ardhuin authored
-
- 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
-
- 19 Nov, 2019 1 commit
-
-
Greg Spencer authored
This adds a FocusableActionDetector, a widget which combines the functionality of Actions, Shortcuts, MouseRegion and a Focus widget to create a detector that defines actions and key bindings, and will notify that the focus or hover highlights should be shown or not. This widget can be used to give a control the required detection modes for focus and hover handling on desktop and web platforms. I replaced a bunch of similar code in many of our widgets with this widget, and found that pretty much any control that wants to be focusable wants all of these features as well: focus highlights, hover highlights, and actions to activate it. Also eliminated an extra _hasFocus variable in FocusState that wasn't being used.
-
- 04 Oct, 2019 1 commit
-
-
Greg Spencer authored
-
- 02 Oct, 2019 1 commit
-
-
Greg Spencer authored
Adds an ActivateAction to controls that use InkWell. Make InkWell host the Focus for those controls, and add the top level binding to the ENTER key. This will make it possible to trigger a button using the enter key, and to get an ink response when the button is triggered. This is a breaking change because it moves the Focus widget into the InkWell. If you have a component that uses the InkWell directly and you used to wrap that InkWell in a Focus widget to give it its notion of focus, it will now not look for that Focus ancestor for its focus state anymore. In order to control focus on the InkWell, you need to give it a FocusNode directly, via the new focusNode parameter. This should not affect users of widgets like OutlineButton or FloatingActionButton and the like, since those have been modified in this PR.
-
- 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.
-
- 26 Sep, 2019 1 commit
-
-
Greg Spencer authored
This changes the way ActionDispatchers are found by the Actions widget, so that by default it will look for dispatchers of the parent Actions widgets instead of just creating a default ActionDispatcher. This allows overriding of the ActionDispatcher at the top level: before, the custom action dispatcher would only be invoked if explicitly set on all the Actions widgets. This is not a breaking change because there was a default value to the dispatcher parameter before that performed this function, and not specifying the dispatcher anywhere will still result in a default dispatcher being created.
-
- 24 Sep, 2019 1 commit
-
-
Alexandre Ardhuin authored
-
- 11 Jun, 2019 1 commit
-
-
Jonah Williams authored
-
- 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".
-