Running InAppLocalhostServer from AppDocumentDirectory not working

I’m trying to run the InAppLocalhostServer with files stored in the AppDocumentDirectory but I only get a white screen.
When trying with the same files from the asset folder it works perfectly. Is there any way I can do this from the AppDocumentDirectory?

I tried to address it with file:// or just a leading /, nothing did work.

That’s my code:
localhostServer = InAppLocalhostServer( documentRoot: '/data/user/0/', ); await localhostServer.start();

And in the WebView:
initialUrlRequest: URLRequest(
url: WebUri(‘http://localhost:8080/index.html’),

Leave a Comment