InAppLocalhostServer constructor

InAppLocalhostServer({
  1. int port = 8080,
  2. String directoryIndex = 'index.html',
  3. String documentRoot = './',
  4. bool shared = false,
})

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),
      );