prefer_async_callback

SeverityQuick FixOptions
Info

Details

PREFER using the built-in typedef AsyncCallback instead of declaring a custom one.

Bad
final Future<void> Function() cb;
Good
final AsyncCallback cb;

Usage

To enable the prefer_async_callback rule, add prefer_async_callback under plugins > pyramid_lint > diagnostics in your analysis_options.yaml file:

plugins:
  pyramid_lint: <version>
    diagnostics:
      prefer_async_callback: true