Merge branch 'krille/update-readme' into 'main'

chore: Update readme with new database

Closes #329

See merge request famedly/company/frontend/famedlysdk!1181
This commit is contained in:
Mohammad Reza Moradi 2022-11-24 13:09:50 +00:00
commit df0981cadc
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;
}, },