delayed_future 1.0.1 copy "delayed_future: ^1.0.1" to clipboard
delayed_future: ^1.0.1 copied to clipboard

retractedoutdated

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.
2
likes
0
points
132
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart extension that allows to delay your Futures.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on delayed_future