toKeyEventResult method
- NextFocusIntent intent,
- covariant bool invokeResult
override
Converts the result of invoke of this action to a KeyEventResult.
This is typically used when the action is invoked in response to a keyboard shortcut.
The invokeResult
argument is the value returned by the invoke method.
By default, calls consumesKey and converts the returned boolean to KeyEventResult.handled if it's true, and KeyEventResult.skipRemainingHandlers if it's false.
Concrete implementations may refine the type of invokeResult
, since
they know the type returned by invoke.
Implementation
@override
KeyEventResult toKeyEventResult(NextFocusIntent intent, bool invokeResult) {
return invokeResult ? KeyEventResult.handled : KeyEventResult.skipRemainingHandlers;
}