encryptOrValidate method

Future<List<EncryptedCalendarItem>> encryptOrValidate(
  1. String sdkId,
  2. List<CalendarItem> calendarItems
)

Implementation

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