- 17 Nov, 2021 2 commits
-
-
Kristen McWilliam authored
-
Greg Spencer authored
-
- 04 Oct, 2021 1 commit
-
-
Greg Spencer authored
This does a cleanup of the examples, removing all of the "section" markers and extra comments that we don't need anymore now that the samples are no longer in the source code. It also removes the --template arguments from the {@tool dartpad} and {@tool sample} directives, since those are no longer used. It converts two examples that I discovered were still embedded into linked examples in the examples folder. I didn't delete the templates from the snippets config folder yet, because there are still embedded samples in the dart:ui package from the engine that use them. Once dart:ui no longer uses the templates, they can be removed. I bumped the version of the snippets package to pick up a change that allows removal of the --template argument.
-
- 25 Aug, 2021 1 commit
-
-
Greg Spencer authored
This extracts the sample code out from the API doc comments, and places them in separate files on disk, allowing running of the examples locally, testing them, and building of slightly larger examples.
-
- 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
-
- 12 Jun, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 19 May, 2021 1 commit
-
-
Tong Mu authored
-
- 10 May, 2021 1 commit
-
-
Michael Goderbauer authored
-
- 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.
-
- 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.
-
- 03 Apr, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 31 Mar, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 16 Mar, 2021 1 commit
-
-
Tong Mu authored
-
- 19 Jan, 2021 1 commit
-
-
Greg Spencer authored
Adds a couple of new examples to the Actions and Shortcuts widgets, and updates some documentation.
-
- 22 Dec, 2020 1 commit
-
-
Justin McCandless authored
-
- 11 Dec, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 03 Dec, 2020 1 commit
-
-
Shi-Hao Hong authored
-
- 20 Nov, 2020 1 commit
-
-
Kate Lovett authored
-
- 17 Nov, 2020 1 commit
-
-
Jim Graham authored
This reverts commit 9b56241e.
-
- 16 Nov, 2020 1 commit
-
-
Kate Lovett authored
-
- 12 Nov, 2020 1 commit
-
-
Zachary Anderson authored
This reverts commit 1f0df545.
-
- 11 Nov, 2020 1 commit
-
-
Kate Lovett authored
-
- 05 Nov, 2020 1 commit
-
-
Arpan Patel authored
* Added Interactive Sample
-
- 02 Nov, 2020 1 commit
-
-
Greg Spencer 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 Sep, 2020 1 commit
-
-
Alexandre Ardhuin authored
* Reland "Nnbd widgets (#64672)" This reverts commit 127e6790. * remove non-nullable enforcement on AsyncSnapshot * make data param non-nullable for AsyncSnapshot.withData * make some Text params non-nullable
-
- 09 Sep, 2020 2 commits
-
-
Michael Goderbauer authored
This reverts commit e682ec71.
-
Alexandre Ardhuin authored
* migrate widget to nullsafety * remove double blank line after license * address review comments in actions.dart * nullable ObjectKey.value * use local variable oldElement * make State.build non-nullable * make State.context non-nullable * newline at eof * make ProxyWidget.child non-nullable * make _InactiveElements.debugContains non-nullable * make Element.depth non-nullable * make ProxyElement.build non-nullable * make StatefulElement.state non-nullable * remove 'Notice that' * avoid cast of list in RenderObjectElement.updateChildren * make IndexedSlot.value non-nullable * avoid cast of list in MultiChildRenderObjectElement.mount * make some WidgetsApp parameters non-nullable * hitTest take non-nullable position * make ScrollableState.position non-nullable * use _pixels instead of pixels * make ViewportOffset.pixels non-nullable * make param and return type of IndexedWidgetBuilder non-nullable * unused_import * make context param non-nullable for Builder in animated_list.dart * make ScrollMetrics.viewportDimension non-nullable * make ScrollMetrics.{min,max}ScrollExtent non-nullable * make _Location.file non-nullable * _WidgetForTypeTests.createElement throw UnimplementedError * update _NullWidget.build error message * make _ShortcutsState.manager non-nullable * Fix childCount issues for NNBD * fix childCount computation on web * increase max value on js side to compute childCount * make aspect parameter of dependOnInheritedWidgetOfExactType nullable * merge has{min,max}ScrollExtent into hasScrollExtents * update focus_manager.dart * address review comments in icon.dart * address review comments in image.dart * address review comments in routes.dart * address review comments in scroll_activity.dart * update doc comments * make UserScrollNotification.direction non-nullable and required * rename hasScrollExtents to hasContentDimensions * unnecessary late Co-authored-by:
Ian Hickson <ian@hixie.ch>
-
- 11 Aug, 2020 1 commit
-
-
Greg Spencer authored
This adds an assert in RawKeyboard that catches the case where it tries to send a key down event, but (after synchronizing modifiers) there are no keys in keysPressed. This state can occur if the modifier flags are not set properly for the platform. Also prevents shortcuts attempting to handle a key down when no keys are pressed at the moment (which was causing a crash in release mode).
-
- 29 Jul, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 16 Jun, 2020 1 commit
-
-
Greg Spencer authored
Remove dependency on package:collection by moving mergeSort into foundation/collections.dart (#59521) This removes a dependency from Flutter (package:collection) by copying the implementation of mergeSort into Flutter's foundation/collections.dart. Also, removed a reference to UnmodifiableSetView from the shortcuts code by just returning a copy instead.
-
- 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
-