Skip to content

Offline support for images #172

@LeeMatthewHiggins

Description

@LeeMatthewHiggins

I have an application who's user base has patchy internet. The application has a download sync function for offline use. At the moment the RichTextParser uses a standard network image, and so will not work offline. I am using cachedNetworkImage in other places in my application to allow offline images. I have tried using the custom render function, however this does not work when using the rich text parser, which I need for the application.

I first added the CachedNetworkImage widget in place of the NetworkImage, this worked well, but added a dependency of the flutter_cache lib. I have refactored to simply expose a custom render function specifically for the image tag. This makes adding a customer image renderer very simple and adds no extra dependencies to flutter_html.

I have a branch with the changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions