isEnabled method

  1. @override
bool isEnabled(
  1. T intent, [
  2. BuildContext? context
])
override

Returns true if the action is enabled and is ready to be invoked.

This will be called by the ActionDispatcher before attempting to invoke the action.

The optional context parameter is the context of the invocation of the action, and in the case of an action invoked by a ShortcutManager, via a Shortcuts widget, will be the context of the Shortcuts widget.

Implementation

@override
bool isEnabled(T intent, [BuildContext? context]) => super.isEnabled(intent);