fluttercommunity / fluttercommunity/flutter_webview_plugin
Load local webpage from assets
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 938
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I try to load a local webpage from my assets:
```dart
new WebviewScaffold(
url: "file:///assets/web/loesungen.html",
allowFileURLs: true,
…
```
But if I open the view in Android emulator I get the error message:
The webpage as **file:///assets/web/loesungen.html** could not be loaded because:
net::ERR_FILE_NOT_FOUND
The assets webpage is correct included in pubspec.yaml and I can load the webpage with:
```dart
final htmlData = await rootBundle.loadString('assets/web/loesungen.html');
```
I user Flutter 1.2.1, Dart 2.1.2 and flutter_webview_plugin 0.3.0
Any ideas why it’s not work?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Reproduce the failure from the WebviewScaffold example on the Android emulator, comparing the file:///assets/web/loesungen.html URL with the rootBundle.loadString('assets/web/loesungen.html') entry point. Read the asset declaration in pubspec.yaml and the plugin's Android WebView handling; done means identifying whether this asset URL is supported and documenting or correcting the loading path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, dart, flutter
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100