chore: Update readme with new database

This commit is contained in:
Christian Pauly 2022-11-23 15:55:01 +01:00
parent 5c7966f3a2
commit a7dda54414
1 changed files with 3 additions and 3 deletions

View File

@ -36,9 +36,9 @@ The SDK works better with a database. Otherwise it has no persistence. For this
```dart
final client = Client(
"HappyChat",
databaseBuilder: (Client client) async {
await Hive.init('/path/to/your/storage');
final db = FamedlySdkHiveDatabase(client.clientName);
databaseBuilder: (_) async {
final dir = await getApplicationSupportDirectory(); // Recommend path_provider package
final db = HiveCollectionsDatabase('matrix_example_chat', dir.path);
await db.open();
return db;
},