无法在 Flutter Web 视图中使用本地存储

问题描述

我在我的应用程序中使用了 Flutter_inappwebview: ^5.3.0 包,除了无法在我的网络视图中上传图片之外,我满足了我的应用程序的所有要求。 一旦我单击该图标,应用程序就会崩溃。 我曾尝试使用 Flutter_webview_plugin 实现这一目标,但还有许多其他问题我无法解决,因此我决定尝试使用 inappwebview,但我仍然坚持这一点。

enter image description here

解决方法

在 Android 上,您需要在 android/app/src/main/AndroidManifest.xml 的标签中添加以下代码:

<provider
    android:name="com.pichillilorenzo.flutter_inappwebview.InAppWebViewFileProvider"
    android:authorities="${applicationId}.flutter_inappwebview.fileprovider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/provider_paths" />
</provider>