storageDeviceId static method

Future storageDeviceId({
  1. required String packageName,
  2. bool enableKeyChainStorage = true,
  3. required String identifier,
})

Implementation

static Future<dynamic> storageDeviceId({
  required String packageName,
  bool enableKeyChainStorage = true,
  required String identifier,
}) {
  if (!enableKeyChainStorage) {
    return Future.value(false);
  }
  if (defaultTargetPlatform == TargetPlatform.iOS ||
      defaultTargetPlatform == TargetPlatform.android) {
    return KeychainService.setDeviceId(packageName, identifier);
  }
  return Future.value(false);
}