flutter simple await delay 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));
await Future.delayed(const Duration(seconds: 2), (){});
sleep(const Duration(seconds: 5));