cacheDeviceKeyAndPassword method

Future<void> cacheDeviceKeyAndPassword()

This is used to cache the device key and device group and device password

Implementation

Future<void> cacheDeviceKeyAndPassword() async {
  final deviceKeyKey = '$keyPrefix.deviceKey';
  final randomPasswordKey = '$keyPrefix.randomPasswordKey';
  final deviceGroupKeyKey = '$keyPrefix.deviceGroupKey';

  await Future.wait([
    storage.setItem(deviceKeyKey, _deviceKey),
    storage.setItem(randomPasswordKey, _randomPassword),
    storage.setItem(deviceGroupKeyKey, _deviceGroupKey),
  ]);
}