Server constructor

Server({
  1. GlobalKey<State<StatefulComponent>>? key,
  2. HttpService? httpService,
  3. WebSocketService? socketService,
  4. DataAccess? dataAccess,
  5. Crypto? cryptoService,
  6. Logger? logger,
  7. String? rootName,
  8. Component? rootEndpoint,
  9. Authorization? authorization,
  10. required List<Component> children,
  11. String? faviconDirectory,
  12. Map<Type, ExceptionEndpoint<Exception>>? defaultExceptionEndpoints,
})

Implementation

Server(
    {GlobalKey? key,
    this.httpService,
    this.socketService,
    this.dataAccess,
    this.cryptoService,
    Logger? logger,
    String? rootName,
    this.rootEndpoint,
    this.authorization,
    required this.children,
    this.faviconDirectory,
    Map<Type, ExceptionEndpoint>? defaultExceptionEndpoints})
    : logger = logger ?? DefaultLogger(),
      rootName = rootName ?? "style_server",
      defaultExceptionEndpoints = defaultExceptionEndpoints ??
          {
            Exception: DefaultExceptionEndpoint<Exception>(),
          },
      super(key: key ?? GlobalKey<ServiceState>.random()) {
  this.defaultExceptionEndpoints[Exception] ??=
      DefaultExceptionEndpoint<Exception>();
}