linkToPatient method

Future<CalendarItem> linkToPatient(
  1. String sdkId,
  2. CalendarItem calendarItem,
  3. Patient patient,
  4. Set<String> shareLinkWithDelegates,
)

Implementation

Future<CalendarItem> linkToPatient(String sdkId, CalendarItem calendarItem, Patient patient, Set<String> shareLinkWithDelegates) async {
	final res = await _methodChannel.invokeMethod<String>(
		'CalendarItemApi.tryAndRecover.linkToPatient',
		{
			"sdkId": sdkId,
			"calendarItem": jsonEncode(CalendarItem.encode(calendarItem)),
			"patient": jsonEncode(Patient.encode(patient)),
			"shareLinkWithDelegates": jsonEncode(shareLinkWithDelegates.map((x0) => x0).toList()),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method linkToPatient");
	final parsedResJson = jsonDecode(res);
	return CalendarItem.fromJSON(parsedResJson);
}