hasWriteAccess method

Future<bool> hasWriteAccess(
  1. String sdkId,
  2. GroupScoped<DecryptedPatient> patient
)

Implementation

Future<bool> hasWriteAccess(String sdkId, GroupScoped<DecryptedPatient> patient) async {
	final res = await _methodChannel.invokeMethod<String>(
		'PatientApi.inGroup.hasWriteAccess',
		{
			"sdkId": sdkId,
			"patient": jsonEncode(GroupScoped.encode(
				patient,
				(x0) {
					return DecryptedPatient.encode(x0);
				},
			)),
		}
	).catchError(convertPlatformException);
	if (res == null) throw AssertionError("received null result from platform method hasWriteAccess");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as bool);
}