decrypt method
Future<List<GroupScoped<DecryptedCalendarItem> > >
decrypt(
- String sdkId,
- List<
GroupScoped< calendarItemsEncryptedCalendarItem> >
Implementation
Future<List<GroupScoped<DecryptedCalendarItem>>> decrypt(String sdkId, List<GroupScoped<EncryptedCalendarItem>> calendarItems) async {
final res = await _methodChannel.invokeMethod<String>(
'CalendarItemApi.inGroup.decrypt',
{
"sdkId": sdkId,
"calendarItems": jsonEncode(calendarItems.map((x0) => GroupScoped.encode(
x0,
(x1) {
return EncryptedCalendarItem.encode(x1);
},
)).toList()),
}
).catchError(convertPlatformException);
if (res == null) throw AssertionError("received null result from platform method decrypt");
final parsedResJson = jsonDecode(res);
return (parsedResJson as List<dynamic>).map((x1) => GroupScoped.fromJSON(
x1,
(x2) {
return DecryptedCalendarItem.fromJSON(x2);
},
) ).toList();
}