sleep function

Future<void> sleep(
  1. num seconds
)

wrapper around Future.delayed to have a simpler syntax

Implementation

Future<void> sleep(num seconds) =>
    Future.delayed(Duration(microseconds: (seconds * 1000000).toInt()));