flutter dart delay code example
Example 1: flutter wait for specific time
await Future.delayed(const Duration(seconds: 2), (){});
Example 2: flutter delay
Timer(Duration(seconds: 5), () {
print(" This line is execute after 5 seconds");
});
await Future.delayed(const Duration(seconds: 2), (){});
Timer(Duration(seconds: 5), () {
print(" This line is execute after 5 seconds");
});