encryptOrValidate method
Future<List<GroupScoped<EncryptedHealthElement> > >
encryptOrValidate(
- String sdkId,
- List<
GroupScoped< healthElementsHealthElement> >
Implementation
Future<List<GroupScoped<EncryptedHealthElement>>> encryptOrValidate(String sdkId, List<GroupScoped<HealthElement>> healthElements) async {
final res = await _methodChannel.invokeMethod<String>(
'HealthElementApi.inGroup.encryptOrValidate',
{
"sdkId": sdkId,
"healthElements": jsonEncode(healthElements.map((x0) => GroupScoped.encode(
x0,
(x1) {
return HealthElement.encode(x1);
},
)).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) => GroupScoped.fromJSON(
x1,
(x2) {
return EncryptedHealthElement.fromJSON(x2);
},
) ).toList();
}