1.2 KiB
1.2 KiB
To enable end to end encryption you need to setup Vodozemac. For this you need Rust installed locally: rust-lang.org/tools/install
For Flutter you can use flutter_vodozemac.
flutter pub add flutter_vodozemac
You also need flutter_openssl_crypto.
flutter pub add flutter_openssl_crypto
Now before you create your Client, init vodozemac:
import 'package:flutter_vodozemac/flutter_vodozemac' as vod;
// ...
await vod.init();
final client = Client(/*...*/);
This should work on Android, iOS, macOS, Linux and Windows.
For web you need to compile vodozemac to wasm. Please refer to the Vodozemac bindings documentation.
Using Vodozemac with NativeImplementations
When using NativeImplementations you have to initialize Vodozemac there as well. Just pass the same init function to it:
final client = Client('Matrix Client',
// ...
// ...
nativeImplementations: NativeImplementationsIsolate(
compute,
vodozemacInit: () => vod.init(),
),
// ...
);