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 ```dart
final client = Client( final client = Client(
"HappyChat", "HappyChat",
databaseBuilder: (Client client) async { databaseBuilder: (_) async {
await Hive.init('/path/to/your/storage'); final dir = await getApplicationSupportDirectory(); // Recommend path_provider package
final db = FamedlySdkHiveDatabase(client.clientName); final db = HiveCollectionsDatabase('matrix_example_chat', dir.path);
await db.open(); await db.open();
return db; return db;
}, },