flutter_cache_manager
flutter_cache_manager copied to clipboard
Add `timeout` parameter for downloading
:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)
This PR is to resolve #141, supporting pass timeout for downloading.
:arrow_heading_down: What is the current behavior?
There is no way to set timeout.
:new: What is the new behavior (if this is a feature change)?
A timeout duration can be set, and the http request will be timeouted after the duration (a TimeoutException will be thrown). If timeout is not set, all behaviors are same with the original.
:boom: Does this PR introduce a breaking change?
N/A
:bug: Recommendations for testing
- Check if it will stop and throw a
TimeoutExceptionafter the duration. - Check if the behavior is same as original when
timeoutis not set.
:memo: Links to relevant issues/docs
Issue #141.
:thinking: Checklist before submitting
- [ ] All projects build
- [x] Follows style guide lines (code style guide)
- [ ] Relevant documentation was updated
- [x] Rebased onto current develop