AppwriteChatBackend constructor

AppwriteChatBackend({
  1. required String endpoint,
  2. required String projectId,
  3. required String databaseId,
  4. required String bucketId,
  5. Client? client,
})

Creates an AppwriteChatBackend for the given Appwrite project and storage bucket.

endpoint and projectId are also used to build public file URLs for uploaded images.

Implementation

AppwriteChatBackend({
  required this.endpoint,
  required this.projectId,
  required this.databaseId,
  required this.bucketId,
  Client? client,
}) : _client =
         client ?? (Client()..setEndpoint(endpoint).setProject(projectId)) {
  _tablesDB = TablesDB(_client);
  _storage = Storage(_client);
  _realtime = Realtime(_client);
}