Skip to content

It is not really convenient to use Future.wait, cause it's leading to type erasing, so this lib created to help you save types while use Future.wait feature. This lib supports up to 24 arguments for saving. So if you wondering how to save type of arguments in Future.wait, this is for you!

License

Notifications You must be signed in to change notification settings

idapgroup/type_saving_wait

Repository files navigation

Type saving wait

It is not really convenient to use Future.wait, cause it's leading to type erasing, so this lib created to help you save types while use Future.wait feature. This lib supports up to 24 arguments for saving. So if you wondering how to save type of arguments in Future.wait, this is for you!

Usage

To use this plugin, add type_saving_wait as a dependency in your pubspec.yaml file.

Examples

Here are small example that show you how to use this library.

Creation of Future.wait with two arguments

FutureSaving.wait2(
    Future.value(3.14),
    Future.value('Awesomness'),
  ).then((value) {
    double a = value.a;
    String b = value.b;
  });

About

It is not really convenient to use Future.wait, cause it's leading to type erasing, so this lib created to help you save types while use Future.wait feature. This lib supports up to 24 arguments for saving. So if you wondering how to save type of arguments in Future.wait, this is for you!

Resources

License

Stars

Watchers

Forks

Packages

No packages published