Comments (12)
CC @lejard-h
from flutter_webview_plugin.
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 also need to receive calls from inside the Webview to Dart - not sure how to do that, other than polling which is pretty bad and will kill battery.
from flutter_webview_plugin.
I need to open a PDF file. I was thinking of doing it with a WebView. Would this be possible?
from flutter_webview_plugin.
@eugenio-tesio I tried that out, it wouldn't work unless if you feed a gdoc url to the method as such:
("http://docs.google.com/gview?embedded=true&url=" + pdfURL). But isn't very suitable for mobile, the gdocs site has additional icons which ruin the UI. Besides that my app also needs to work offline. So my workaround has been to convert the PDFs to HTML first.
from flutter_webview_plugin.
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.
from flutter_webview_plugin.
duplicate of #23
I am closing this one since we already discussed about solution in the previous one
from flutter_webview_plugin.
@lejard-h that solution isn't working well for me it seems. I'm getting this: (17795): Unrecognized GLES max version string in extensions:
E/flutter (17795): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (17795): Invalid argument(s): String contains invalid characters.
E/flutter (17795): #0 _UnicodeSubsetEncoder.convert (dart:convert/ascii.dart:97:9)
E/flutter (17795): #1 AsciiCodec.encode (dart:convert/ascii.dart:47:46)
E/flutter (17795): #2 new UriData.fromString (dart:core/uri.dart:3197:44)
E/flutter (17795): #3 new Uri.dataFromString (dart:core/uri.dart:304:24)
E/flutter (17795): #4 _MyHomePageState.getUri. (file:///home/maskys/webview_test/lib/main.dart:57:21)
the widget webview remains white
from flutter_webview_plugin.
I think that is triggering because my html file contains quote characters?
from flutter_webview_plugin.
isn't the quote characters, must be something else.. Possible all the special characters in the file or the square brackets.
from flutter_webview_plugin.
@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.
from flutter_webview_plugin.
if you launch a web server you should not have problem
here is an example https://github.com/Jaguar-dart/jaguar_flutter_asset
from flutter_webview_plugin.
even if the solution don't work for you, it is the same issue, please continue the conversation on the other one and try the solution of @Kleak describe in the article mention in the other issue
from flutter_webview_plugin.
Related Issues (20)
- 使用flutter_webview_plugin dialog侧边划出控件均被webview遮住
- Is there anybody use FirebaseMessaging.onBackgroundMessage with javascript channel ?
- 在安卓13中报错,注释掉这个就可以了。 HOT 2
- Is it possible to load and display Three.js content in Flutter Web Application ?
- WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren't compatible with AndroidX. See https://goo.gl/CP92wY for more information on the problem and how to fix it. This warning prints for all Android build failures. The real root cause of the error may be unrelated. HOT 3
- 2222
- deprecated version
- IOS goes to live broadcast instead of camera on video recording
- Download File feature in webview is long overdue now
- this plugin is deprecated and use plugin migration HOT 8
- Build failed on Android Target SDK 33 HOT 1
- How to set user agent as Microsoft Edge ? HOT 1
- Not able to Import the package
- The iOS and Android execution returns are inconsistent
- Using WebviewScaffold to load URLs doesn't work in iOS
- Android webview error
- different roots error: :flutter_webview_plugin:compileDebugUnitTestSources
- deprecated version for flutter dart version 3
- Webview dont load for Android with new flutter version
- Remove references to deprecated v1 Android embedding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_webview_plugin.