matrix_sdk 0.1.3 matrix_sdk: ^0.1.3 copied to clipboard
A Dart implementation of the federated communications protocol, Matrix.
import 'package:matrix_sdk/matrix_sdk.dart';
import 'package:idb_shim/idb_client_native.dart';
void main() async {
final store = IndexedDbStore(path: '/tmp/matrix.db',
idbFactory: idbNativeFactory);
// Open the store before passing it to the homeserver
await store.open();
final hs = Homeserver(Uri.parse("https://matrix.org"), store: store);
final user = await hs.login(Username("joe"), "badPassword");
await for (bool succes in user.sync()) {
if (succes) {
// Do something
}
}
}