init method

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

Implementation

Future<void> init(String? olmAccount,
    {String? deviceId,
    String? pickleKey,
    bool isDehydratedDevice = false}) async {
  ourDeviceId = deviceId ?? client.deviceID!;
  await olmManager.init(
      olmAccount: olmAccount,
      deviceId: isDehydratedDevice ? deviceId : ourDeviceId,
      pickleKey: pickleKey);
  _backgroundTasksRunning = ourDeviceId ==
      client.deviceID; // Don't run tasks for dehydrated devices
  _backgroundTasks(); // start the background tasks
}