delayForResult<T> static method

Future<T> delayForResult<T>(
  1. Duration duration,
  2. AsyncTask<T> task
)

Implementation

static Future<T> delayForResult<T>(Duration duration, AsyncTask<T> task) async{
  return Future.delayed(duration, (){
    return task();
  });
}