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

Network Support #26

Closed
kuntojirohan opened this issue Nov 18, 2020 · 3 comments
Closed

Network Support #26

kuntojirohan opened this issue Nov 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@kuntojirohan
Copy link

kuntojirohan commented Nov 18, 2020

This is a lovely plugin, awesome work! Can you please try to include the support to render pdf files by fetching them from network/url?

@espresso3389 espresso3389 reopened this Mar 23, 2021
@espresso3389 espresso3389 added the enhancement New feature or request label Mar 23, 2021
@sajanyamaha
Copy link

any plans for this enhancement ?

@espresso3389
Copy link
Owner

espresso3389 commented Apr 4, 2021

Using flutter_cache_manager, it is very easy to implement the feature. The code might be like the following fragment:

FutureBuilder<File>(
  future: DefaultCacheManager().getSingleFile(url),
  builder: (context, snapshot) => snapshot.hasData ? PdfViewer.file(snapshot.data.path) : Container(/* some placeholder */)
)

Because the feature is so easy to implement and I don't make the plugin larger, I don't want to implement this on the plugin.

@espresso3389
Copy link
Owner

On 1.0.9, I updated README.md to explain the missing networking feature and also the example code has sample usage (for macOS but it also works on every platform).

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

No branches or pull requests

3 participants