simulateWait function

Future<void> simulateWait(
  1. String desc, [
  2. Duration? duration
])

Implementation

Future<void> simulateWait(String desc, [Duration? duration]) async {
  print('waiting on $desc...');
  await Future<void>.delayed(
      duration ?? Duration(milliseconds: Random().nextInt(10)));
  print('done $desc');
}