-
Notifications
You must be signed in to change notification settings - Fork 936
Load a local file #60
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
Comments
CC @lejard-h |
I have exactly the same requirement. i need to load a react app that is stored locally. Its actually some very complex JS that i cant rewrite in Dart. It does CRDT stuff. Once loaded i need to call certain public exported JavaScript functions. Wondering if i can use EvalJavascript Dart call. |
I need to open a PDF file. I was thinking of doing it with a WebView. Would this be possible? |
@eugenio-tesio I tried that out, it wouldn't work unless if you feed a gdoc url to the method as such: |
I found this today, we may be able to do this, but will require changes to the plugin. See https://flutter.io/assets-and-images/#sharing-assets-with-the-underlying-platform. Another way that can work is to pass a url like "file:///data/data/com.provider.package/file_name.html" but you will need the exact file path of the HTML. I didn't manage to do this though because my assets are inside the assets folder of my project, and those are not placed in any kind of permanent directory. |
duplicate of #23 I am closing this one since we already discussed about solution in the previous one |
@lejard-h that solution isn't working well for me it seems. I'm getting this: (17795): Unrecognized GLES max version string in extensions: the widget webview remains white |
I think that is triggering because my html file contains quote characters? |
isn't the quote characters, must be something else.. Possible all the special characters in the file or the square brackets. |
@lejard-h Please reopen, the solution in #23 doesn't seem to be able to work for this use case. I will need to load various files which all contain image assets, special characters like © and other symbols. The easiest way imho is if we can figure out how to use the "file:///" syntax to load files from the project's asset folder. |
if you launch a web server you should not have problem |
Hi, how can I open a file that is locally stored on the device? For example, if the file index.html is located inside my project's assets folder?
The text was updated successfully, but these errors were encountered: