Server constructor

Server({
  1. HttpClient? client,
  2. Storage? storage,
  3. Uri? baseUrl,
})

Implementation

Server({HttpClient? client, Storage? storage, Uri? baseUrl})
  : storage = storage ?? SessionStorage() {
  final url = baseUrl?.toString() ?? "http://localhost:8080";

  this.client = RevaliClient(
    client: client ?? HttpPackageClient(),
    baseUrl: url,
    storage: this.storage,
  );

  this.storage.save('__BASE_URL__', url);
}