future_context 0.0.2+11 future_context: ^0.0.2+11 copied to clipboard
Cancelable future support. 'future_context' library is Experimental.
future_context
Features #
Flutterアプリの非同期処理キャンセル処理をサポートする.
- FutureContext Kotlin.coroutinesのようなキャンセル可能な非同期処理
Usage #
TODO.
final context = FutureContext();
// if you should cancel this `suspend` block.
// context.cancel();
final value = await context.suspend((context) async {
// Very slow.
return 100;
});
// finalyze
context.close();