InAppLocalhostServer constructor
InAppLocalhostServer({})
This class allows you to create a simple server on http://localhost:[port]/
in order to be able to load your assets file on a local server.
The default port
value is 8080
.
Officially Supported Platforms/Implementations:
- Android native WebView
- iOS
- MacOS
Implementation
InAppLocalhostServer({
int port = 8080,
String directoryIndex = 'index.html',
String documentRoot = './',
bool shared = false,
}) : this.fromPlatformCreationParams(
PlatformInAppLocalhostServerCreationParams(
port: port,
directoryIndex: directoryIndex,
documentRoot: documentRoot,
shared: shared),
);