Check out example codes for "sleep in dart". It will help you in understanding the concepts better.

Code Example 1

sleep(const Duration(seconds: 5));

Code Example 2

import 'dart:io';

main() {
  sleep(const Duration(seconds:1));
}

Learn ReactJs, React Native from akashmittal.com