Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use a retry strategy? #20

Closed
Luk3s opened this issue Feb 26, 2018 · 3 comments
Closed

Is it possible to use a retry strategy? #20

Luk3s opened this issue Feb 26, 2018 · 3 comments

Comments

@Luk3s
Copy link

Luk3s commented Feb 26, 2018

Is there a way to use the cached network image plugin together with the NetworkImageWithRetry plugin? I'd like to use a retry strategy but I don't know how to connect the two plugins since both require the image url and retrieve the image.

@renefloor
Copy link
Contributor

No those cannot be combined as they are both ImageProviders. You could have a look at the code and try to combine them. You could use something like this with the cachemanager I use in this library:

        request = await _client.getUrl(instructions.uri).timeout(instructions.timeout);
        final io.HttpClientResponse response = await request.close().timeout(instructions.timeout);

        if (response == null || response.statusCode != 200) {
          throw new FetchFailure._(
            totalDuration: stopwatch.elapsed,
            attemptCount: attemptCount,
            httpStatusCode: response.statusCode,
          );
        }

@expilu expilu mentioned this issue Jul 23, 2020
2 tasks
@danielgomezrico
Copy link

@renefloor I dont understand your proposed solution, to us it is pretty important to add this strategy, is there any way that you could add some comments around how could this be done to the library and maybe I could make the contribution?

@markwitt1
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants