fluttercommunity / fluttercommunity/flutter_webview_plugin

can not load local images with html data string

オープン
#544 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.5k
フォーク
938
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello, sir
I met an issue about loading images that are stored locally .
I tried using
```
return WebviewScaffold(
url: new Uri.dataFromString(widget.topicContentEntity.content,
mimeType: 'text/html', encoding: Encoding.getByName("utf-8"))
.toString(),
withJavascript: true,
withLocalUrl: true,
allowFileURLs: true,
);

```
the local html string contains
`""`

but it always failed to load local image with this warning
\"flutter webview not allowed to load local resource\"

before , I used
https://developer.android.com/reference/android/webkit/WebView.html#loadDataWithBaseURL ?
with native android code to load the html string and the image.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、提供されたHTMLデータ文字列、ローカルファイルURL、ローカル画像の設定を使ってWebviewScaffoldのケースを再現します。Android WebViewのネイティブ処理を読み、言及されているloadDataWithBaseURLの動作と比較します。ローカル画像が「not allowed to load local resource」という警告なしに読み込まれれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, dart, flutter, java
領域
mobile-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。