flutter wait 2 seconds code example
Example 1: flutter wait for specific time
await Future.delayed(const Duration(seconds: 2), (){});
Example 2: thread sleep daret
sleep(const Duration(seconds: 5));
Example 3: dart wait 5 seconds
await Future.delayed(Duration(seconds: 1));