Update lib/utils/famedlysdk_store.dart

This commit is contained in:
Christian Pauly 2020-02-17 13:46:05 +00:00
parent 048dfb3a01
commit 0bac4b5903
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,11 @@ class Store extends StoreAPI {
await storage.ready;
return await storage.setItem(key, value);
}
return await secureStorage.write(key: key, value: value);
if (value == null) {
return await secureStorage.delete(key: key);
} else {
return await secureStorage.write(key: key, value: value);
}
}
Future<Map<String, DeviceKeysList>> getUserDeviceKeys() async {