问题标签 [flutterwebviewplugin]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
989 浏览

flutter - Flutter WebView 保留访问令牌

我正在构建一个颤振应用程序,它会在应用程序中的某个时间点打开一个 web 视图,访问我的 SSO 应用程序后面的网页。

截至目前,当用户使用flutter_AppAuth插件 ([ https://pub.dev/packages/flutter_appauth][1] ) 登录时,用户将获得一个存储在应用程序中的令牌。

当用户单击安全站点的链接时,应用程序会在 Web 视图 ( https://pub.dev/packages/flutter_webview_plugin ) 中打开 URL,并将令牌放置在标头中,并验证为已登录的用户我的问题是曾经在此页面上,单击网页上的另一个链接会强制我进入 sso 登录页面,即使之前已接受令牌。

我的问题是如何确保存储令牌并在用户浏览网页时使用令牌以确保他们不必再次登录?

0 投票
1 回答
154 浏览

android - 在颤动中按下移动后退按钮后网站应用程序未退出

我使应用程序在导航栏中具有功能。(重新加载网页)(返回网页)。(浏览网页的转发。)我面临的问题我想退出应用程序,它没有通过移动返回按钮退出。在模拟器中应用程序正在退出,但在实际的 android 设备中它没有退出。我怎样才能退出应用程序。我是新来的,所以不知道怎么做。

代码:main.dart

0 投票
1 回答
1097 浏览

flutter - Flutter WebChromeClient 等效,使用 openFileChooser 和 onShowFileChooser

我正在尝试覆盖 openFileChooser/ onShowFileChooser /(在 IOS 上也等效),在 web 视图中使用颤振(我使用了 flutter_webview_pluginwebview_flutter)。

有没有办法只使用颤振来做到这一点?(如果没有,我将不得不为 IOS 和 android 找到解决方案)

0 投票
1 回答
3732 浏览

flutter - 如何在 Flutter 的 tabbarwiew 中使 webview 可滚动

我花了将近两天的时间试图弄清楚如何在 Flutter 的 tabbarview 中使 webview 可滚动。我知道 TabBarWiew 小部件应该包装在一个固定高度的小部件中,有什么办法可以解决这个问题?我不知道它是否有帮助,但我的minSdkVersion 是 16 和 targetSdkVersion 是 28,这是flutter --version命令的输出

下面是我正在构建的页面的代码。

0 投票
1 回答
437 浏览

flutter - 如何让 Flutter 的 webview 处理从本地 html 加载的本地资产?

我有一个加载 css 文件、字体和图像文件的 html 文件。目前我的 webview 加载时没有加载任何这些辅助文件,没有显示图像,没有显示 css。我正在尝试这样:

html 中的资产具有 zemelapis.html 位置的假定前缀,例如

0 投票
1 回答
809 浏览

flutter - 有没有办法在 Flutter WebView 中导入外部脚本

我正在尝试将外部脚本加载到 Flutter WebView 中,但它似乎不起作用。特别是关于 tinyMCE。所以目的是在一个AlertDialog中打开一个富文本编辑器,里面有WebView。那可能吗?

以下是我的html:

这就是我的小部件:

我在控制台中得到以下日志:

任何帮助将非常感激。谢谢!

0 投票
1 回答
2453 浏览

flutter - Flutter webview显示空白屏幕

我正在尝试在我的颤振应用程序上使用 WebView() 。在我编写代码之后,没有任何错误,但是,在我的模拟器上运行调试模式时,页面是空白的。AppBar 在那里,文本也在上面,但正文是一个空白屏幕。

0 投票
0 回答
830 浏览

android - Flutter - WebView 不适用于 Android

flutter_webview_plugin: ^0.3.10+1从 Android 设备启动时使用时遇到问题。从 iOS 启动时,无论是实际设备还是模拟器,一切都按预期工作。

从 Android 启动时,它看起来像是尝试启动 webview 并且微调器一直在旋转,下面是调试控制台中显示的内容。如果有人对可能发生的事情有任何想法,或者可能是颤振升级破坏了 android,请提供任何想法!

感谢您的关注。

I/WebViewFactory( 7409): Loading com.google.android.webview version 74.0.3729.185 (code 373018518) I/neinsurance.pr( 7409): The ClassLoaderContext is a special shared library. I/neinsurance.pr( 7409): The ClassLoaderContext is a special shared library. I/cr_LibraryLoader( 7409): Time to load native libraries: 12 ms (timestamps 8589-8601) I/chromium( 7409): [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 I/cr_LibraryLoader( 7409): Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185" W/cr_ChildProcLH( 7409): Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true W/neinsurance.pr( 7409): Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed) I/cr_BrowserStartup( 7409): Initializing chromium process, singleProcess=false W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/neinsurance.pr( 7409): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed) W/cr_media( 7409): Requires BLUETOOTH permission D/HostConnection( 7409): HostConnection::get() New Host Connection established 0xb4551950, tid 8414 D/HostConnection( 7409): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation( 7409): eglCreateContext: 0xbe5097c0: maj 3 min 0 rcv 3 D/EGL_emulation( 7409): eglMakeCurrent: 0xbe5097c0: ver 3 0 (tinfo 0xb45830d0) E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 1 (1) 1 0 I/VideoCapabilities( 7409): Unsupported profile 4 for video/mp4v-es W/cr_MediaCodecUtil( 7409): HW encoder for video/avc is not available on this device. D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 1 2 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 1 2 D/NetworkSecurityConfig( 7409): No Network Security Config specified, using platform default D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 0 0 D/EGL_emulation( 7409): eglCreateContext: 0xb45d4d20: maj 3 min 0 rcv 3 D/EGL_emulation( 7409): eglMakeCurrent: 0xb45d4d20: ver 3 0 (tinfo 0xb45830d0) E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 1 (1) 0 0 E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef E/eglCodecCommon( 7409): glUtilsParamSize: unknow param 0x000088ef D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 2 (2) 0 0 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 1 2 I/chatty ( 7409): uid=10139(com.frontlineinsurance.pro) RenderThread identical 14 lines D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 1 2 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 1 (1) 0 0 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 2 (2) 0 0 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 1 (1) 1 8 D/eglCodecCommon( 7409): setVertexArrayObject: set vao to 0 (0) 0 2

0 投票
0 回答
44 浏览

flutter - 使用flutter构建浏览器应用

我想开始为 ios 设备开发新的浏览器应用程序。我可以使用 Flutter 和 webview_flutter 插件为 IOS 设备构建自定义浏览器,例如 google chrome 或 monzila

0 投票
0 回答
403 浏览

flutter - 使用长列表或 URL 参数从颤振中打开一个 url

我需要从颤振中打开一个网页,并且需要以某种方式传递一长串数据。我目前正在以编程方式创建一个 URL 并通过 url 参数传递数据(例如 www.mysite.com?param1=something¶m2=... 并使用 url_launcher 插件打开 url。这工作得很好,直到我创建一个太长(偶尔发生)给我一个 http 431 错误。我拥有我需要打开的网页,并且可以修改我接收数据的方式(获取、发布等)。

发布请求似乎是比我目前正在做的更好的方法,但我不知道如何在发布请求的正文中将此数据发送到站点,然后使用此预加载数据打开站点。

任何帮助/想法将不胜感激!