Flutter Can';等待&x27;在未来内使用。延迟?

Flutter Can';等待&x27;在未来内使用。延迟?,flutter,Flutter,这是我试过的,但没用。我想在持续时间延迟后运行等待函数。感谢您的帮助。您应该等待延迟的未来: await Future.delayed(delay,()async=>await affunction()); 您应该等待延迟的未来: await Future.delayed(delay,()async=>await affunction()); Future.delayed(duration, () async { await aFunction(); });

这是我试过的,但没用。我想在持续时间延迟后运行等待函数。感谢您的帮助。

您应该等待延迟的未来:

await Future.delayed(delay,()async=>await affunction());

您应该等待延迟的未来:

await Future.delayed(delay,()async=>await affunction());
 Future.delayed(duration, () async {
      await aFunction();
    });