Flutter-based compute operation that can be canceled with either null or a specific value.
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);
}
Canceling doesn't stop the running future.
Please file feature requests and bugs at the issue tracker.
MIT