fluttercommunity / fluttercommunity/flutter_webview_plugin

Load local webpage from assets

Abierto
#349 11 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
1.5k
Forks
938
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
android, dart, flutter
Área
mobile-dev
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.