Reputation: 179
Future.delayed(duration, () async {
await aFunction();
});
This is what i tried but it didn't work. I want to run an await function after a duration delay. Thanks for any help.
Upvotes: 0
Views: 187
Reputation: 2531
You should to await delayed future:
await Future.delayed(delay, () async => await aFunction());
Upvotes: 2