PocketBase constructor

PocketBase(
  1. String baseUrl, {
  2. String lang = "en-US",
  3. AuthStore? authStore,
  4. Client httpClientFactory()?,
})

Implementation

PocketBase(
  this.baseUrl, {
  this.lang = "en-US",
  AuthStore? authStore,
  // used primarily for the unit tests
  http.Client Function()? httpClientFactory,
}) {
  this.authStore = authStore ?? AuthStore();
  this.httpClientFactory = httpClientFactory ?? http.Client.new;

  admins = AdminService(this);
  collections = CollectionService(this);
  files = FileService(this);
  realtime = RealtimeService(this);
  settings = SettingsService(this);
  logs = LogService(this);
  health = HealthService(this);
  backups = BackupService(this);
}