Merge pull request #1657 from Nirajn2311/fix/decode-asset-url

feat: InAppLocalhostServer decode assets url when loading them
This commit is contained in:
Lorenzo Pichilli 2023-06-12 17:36:03 +02:00 committed by GitHub
commit 7fb030e93d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
<h3 class="masthead-brand">Flutter InAppWebView</h3>
<nav class="nav nav-masthead justify-content-center">
<a class="nav-link active" href="index.html">Home</a>
<a class="nav-link" href="page-1.html">Page 1</a>
<a class="nav-link" href="page 1.html">Page 1</a>
<a class="nav-link" href="page-2.html">Page 2</a>
</nav>
</div>

View File

@ -86,7 +86,7 @@ class InAppLocalhostServer {
path = _documentRoot + path;
try {
body = (await rootBundle.load(path)).buffer.asUint8List();
body = (await rootBundle.load(Uri.decodeFull(path))).buffer.asUint8List();
} catch (e) {
print(e.toString());
request.response.close();