Server constructor

const Server({
  1. required ServerFetch fetch,
  2. ServerHook? onStart,
  3. ServerHook? onStop,
  4. ServerErrorHook? onError,
})

Creates a server with a mandatory request handler and optional hooks.

Implementation

const Server({required this.fetch, this.onStart, this.onStop, this.onError});