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

🐛 fix(fm-cache): assertion error in ImageProvider if total bytes are unknown in onReceiveProgress callback. #37

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

Thelm76
Copy link
Contributor

@Thelm76 Thelm76 commented Feb 19, 2024

This PR adds filters in the CachedImageProvider in order to avoid the assertion errors throwed by the ImageChunkEvent

fyi : when the total response size is unknown by the Dio while executing a get method, the total parameter passed through the onReceivedProgress callback is -1, whereas ImageChunkEvent expects null in that case.

@josxha josxha changed the title 🐛 fix(map_cache): image provider assert errors 🐛 fix(fm-cache): assertion error in ImageProvider if total bytes are unknown in onReceiveProgress callback. Feb 19, 2024
@josxha josxha merged commit 5e9ab43 into josxha:main Feb 19, 2024
5 checks passed
@josxha
Copy link
Owner

josxha commented Feb 19, 2024

Thanks for the pull request!

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

Successfully merging this pull request may close these issues.

[flutter_map_cache] CachedImageProvider generates assert errors
2 participants