future_context 0.0.2%2B13

SDKflutter
Platformandroidioswindowslinuxmacosweb

Cancelable future support. 'future_context' library is Experimental.

future_context

Github Actions

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();