delay function

Future delay({
  1. int s = 0,
  2. int ms = 0,
})

Implementation

Future delay({int s = 0, int ms = 0}) async {
  if (s > 0) {
    await Future.delayed(Duration(seconds: s));
  } else {
    await Future.delayed(Duration(milliseconds: ms));
  }
}