Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.48 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.48 KB

GitHub Actions Build ✅ codecov

This package is useful when you want to add multiple future callbacks sequentially

A specific use case: you want show popup sequentially to avoid multiple dialog, overlay banner show it at the same time.

Usage

QueueFutureCallback queueFutureCallBack = QueueFutureCallback();
final popUp1 = Future.delay(Duration(second: 1));
final popUp2 = Future.delay(Duration(second: 1));
final popUp3 = Future.delay(Duration(second: 1));
queueFutureCallBack.addFutureIntoQueue(() => popUp1);
queueFutureCallBack.addFutureIntoQueue(() => popUp2);
queueFutureCallBack.addFutureIntoQueue(() => popUp2);