init method

Future<void> init(
  1. String? olmAccount, {
  2. String? deviceId,
  3. String? pickleKey,
  4. String? dehydratedDeviceAlgorithm,
})

Implementation

Future<void> init(
  String? olmAccount, {
  String? deviceId,
  String? pickleKey,
  String? dehydratedDeviceAlgorithm,
}) async {
  ourDeviceId = deviceId ?? client.deviceID!;
  final isDehydratedDevice = dehydratedDeviceAlgorithm != null;
  await olmManager.init(
    olmAccount: olmAccount,
    deviceId: isDehydratedDevice ? deviceId : ourDeviceId,
    pickleKey: pickleKey,
    dehydratedDeviceAlgorithm: dehydratedDeviceAlgorithm,
  );

  if (!isDehydratedDevice) keyManager.startAutoUploadKeys();
}