cancellable method
Associates this effect with id so that it can be cancelled later.
Setting cancelInFlight to true cancels any currently running effect
that uses the same identifier before starting this one.
Example:
final cancellableSearch = searchEffect.cancellable(id: "search", cancelInFlight: true);
Implementation
Effect<Value> cancellable({
required EffectID id,
bool cancelInFlight = false,
}) =>
CancellableEffect(id: id, effect: this, cancelInFlight: cancelInFlight);