withEncryptionMetadata method
Future<DecryptedMaintenanceTask>
withEncryptionMetadata(
- String sdkId,
- DecryptedMaintenanceTask? maintenanceTask,
- User? user,
- Map<
String, AccessLevel> delegates,
Implementation
Future<DecryptedMaintenanceTask> withEncryptionMetadata(String sdkId, DecryptedMaintenanceTask? maintenanceTask, User? user, Map<String, AccessLevel> delegates) async {
final res = await _methodChannel.invokeMethod<String>(
'MaintenanceTaskApi.withEncryptionMetadata',
{
"sdkId": sdkId,
"maintenanceTask": jsonEncode(maintenanceTask == null ? null : DecryptedMaintenanceTask.encode(maintenanceTask!)),
"user": jsonEncode(user == null ? null : User.encode(user!)),
"delegates": jsonEncode(delegates.map((k0, v0) => MapEntry(k0, AccessLevel.encode(v0)))),
}
);
if (res == null) throw AssertionError("received null result from platform method withEncryptionMetadata");
final parsedResJson = jsonDecode(res);
return DecryptedMaintenanceTask.fromJSON(parsedResJson);
}