delay function

void delay(
  1. int ms,
  2. Function target,
  3. List arguments
)

Invokes func after wait milliseconds. Any additional arguments are provided to func when it's invoked.

Implementation

void delay(int ms, Function target, List arguments) {
  Future.delayed(Duration(milliseconds: ms), () {
    Function.apply(target, arguments);
  });
}