callService method
Call a service that is registered by exactly one client.
Implementation
Future<Response> callService(
String name, {
String? isolateId,
Map<String, dynamic>? args,
// ignore: avoid-redundant-async, for some reasons tests fail without `async
}) async {
final registeredMethod = _registeredMethodsForService[name];
if (registeredMethod == null) {
throw Exception('There is no registered method for service "$name"');
}
return service!.callMethod(
registeredMethod,
isolateId: isolateId,
args: args,
);
}