int async(void callback(), {int waitTime})

Runs a callback function asyncronously.

By default (if no waitTime is specified), async callbacks are run at microtask timing, which will occur before paint.

Returns a number that may be used to cancel the async job.

Source

int async(void callback(), {int waitTime}) => jsElement.callMethod(
    'async', [Zone.current.bindCallback(callback), waitTime]);