onComplete property

Future<int> get onComplete

Completes with the HTTP status code (200) when the download succeeds.

Completes with an error for an unsuccessful HTTP response whose error body can be decoded, or if the task is canceled. Other failures are not consistently forwarded here and may leave this future pending.

Implementation

Future<int> get onComplete => _completer.future;