convertFunctionFromSyncToAsync abstract method

void convertFunctionFromSyncToAsync(
  1. FunctionBody body,
  2. TypeProvider typeProvider
)

Create one or more edits that will convert the given function body from being synchronous to be asynchronous. This includes adding the async modifier to the body as well as potentially replacing the return type of the function to Future.

There is currently a limitation in that the function body must not be a generator.

Throws an ArgumentError if the function body is not both synchronous and a non-generator.

Implementation

void convertFunctionFromSyncToAsync(
    FunctionBody body, TypeProvider typeProvider);