read method
Implementation
@override
Future<Wallet> read(String id) async {
final wallet =
(jsonDecode(await secureStorage.read(key: StorageKeys.wallets) ?? '[]')
as List<dynamic>)
.map((e) => Wallet.fromJson(e as Map<String, dynamic>))
.toList()
.firstWhereOrNull((element) => element.id == id);
if (wallet == null) {
throw Exception("This Wallet doesn't exist");
}
return wallet;
}