handler<T extends Intent> method

VoidCallback? handler<T extends Intent>(
  1. T intent
)

Returns a VoidCallback handler that invokes the bound action for the given Intent If the action is enabled, and returns null if the action is not enabled, or no matching action is found.

This is intended to be used in widgets which have something similar to an onTap handler, which takes a VoidCallback, and can be set to the result of calling this function.

Example:

VoidCallback? handler = context.handler(SomeIntent());

Implementation

VoidCallback? handler<T extends Intent>(T intent) =>
    Actions.handler(this, intent);