InAppLocalhostServer constructor

InAppLocalhostServer({
  1. int port = 8080,
  2. String directoryIndex = 'index.html',
  3. String documentRoot = './',
  4. bool shared = false,
  5. Future<bool> onData(
    1. HttpRequest request
    )?,
})

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.

Implementation

InAppLocalhostServer({
  int port = 8080,
  String directoryIndex = 'index.html',
  String documentRoot = './',
  bool shared = false,
  Future<bool> Function(HttpRequest request)? onData,
}) : this.fromPlatformCreationParams(
       PlatformInAppLocalhostServerCreationParams(
         port: port,
         directoryIndex: directoryIndex,
         documentRoot: documentRoot,
         shared: shared,
         onData: onData,
       ),
     );