I\'d like to execute a function after a certain delay after my Widget is built. What\'s the idiomatic way of doing this in Flutter?
What I\'m trying to achieve: I\'
(Adding response on old q as this is the top result on google)
I tried yielding a new state in the callback within a bloc, and it didn't work. Tried with Timer and Future.delayed.
However, what did work was...
await Future.delayed(const Duration(milliseconds: 500));
yield newState;
Awaiting an empty future then running the function afterwards.