shareWithMany method

Future<EncryptedPatient> shareWithMany(
  1. String sdkId,
  2. EncryptedPatient patient,
  3. Map<String, PatientShareOptions> delegates
)

Implementation

Future<EncryptedPatient> shareWithMany(String sdkId, EncryptedPatient patient, Map<String, PatientShareOptions> delegates) async {
	final res = await _methodChannel.invokeMethod<String>(
		'PatientApi.encrypted.shareWithMany',
		{
			"sdkId": sdkId,
			"patient": jsonEncode(EncryptedPatient.encode(patient)),
			"delegates": jsonEncode(delegates.map((k0, v0) => MapEntry(k0, PatientShareOptions.encode(v0)))),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method shareWithMany");
	final parsedResJson = jsonDecode(res);
	return EncryptedPatient.fromJSON(parsedResJson);
}