cancelable_compute 1.3.0 copy "cancelable_compute: ^1.3.0" to clipboard
cancelable_compute: ^1.3.0 copied to clipboard

Flutter based compute operation, that can be canceled with null or with value.

pub package

cancelable-compute.dart #

Flutter based compute operation, that can be canceled with null or given value.

Usage #

A simple usage example:

import 'package:cancelable_compute/cancelable_compute.dart';

Future<void> main() async {
  var operation = compute(fib, 256);

  void onTap() {
    operation.cancel(-1);
  }

  final result = await operation.value;
  print(result);
}

Note for Web #

Cancel don't stop running future.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

License #

MIT

4
likes
140
pub points
76%
popularity

Publisher

unverified uploader

Flutter based compute operation, that can be canceled with null or with value.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on cancelable_compute