readList method
Implementation
Future<List<dynamic>?> readList({required String key, bool isEncrypted = true}) async {
final encryptedData = await _secureStorage.read(key: key);
if (encryptedData != null) {
if (isEncrypted) {
final decryptedData = _encrypter.decrypt64(encryptedData, iv: _iv);
return json.decode(decryptedData) as List<dynamic>;
} else {
return json.decode(encryptedData) as List<dynamic>;
}
}
return null;
}