delayed_future 1.0.1
delayed_future: ^1.0.1 copied to clipboard
A Dart extension that allows to delay your Futures.
1.0.1 #
-
Delay first, then execute the future.
This is due to the future was executed before the delay is done. It could cause issues if the future itself doens't just calculate something, but changes the state in any way.
One of the examples, is setting a state.
Future<void> makePageBlue() async { // Let's pretend it does something meaningful here ... if (mounted) { setState(() { pageColor = Colors.cyan; }); } } ... await makePageBlue().delayed(); // This 👆 will make the page blue without any delay in 1.0.0
1.0.0 #
- Initial version.