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

[Feature] add header for download image #41

Closed
beerline opened this issue Mar 28, 2022 · 2 comments
Closed

[Feature] add header for download image #41

beerline opened this issue Mar 28, 2022 · 2 comments

Comments

@beerline
Copy link

beerline commented Mar 28, 2022

Hi, and thank u for such a good library!

In my case image on server protected by auth token which should be passed in the Header.
Since blurhash used Image.network under the hood now it is impossible to pass token.

Seems like to reach this goal at the BlurHashState.prepareDisplayedImage instead of Image.network we need use:

Image(
    image: NetworkImage(
    imagePath,
    headers: {
      HttpHeaders.authorizationHeader: 'token',
    },
),

Let me know what u thinking and i can help with implementation

@Robert-Scub
Copy link
Contributor

Oh this is an interesting case!
We should be able to pass an optional Headers paramaters.
Would it be enough for you?

@Solido
Copy link
Member

Solido commented Apr 12, 2022

Pushed on 0.6.6 @beerline

@Solido Solido closed this as completed Apr 12, 2022
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

3 participants