callService method
Call a service that is registered by exactly one client.
Implementation
Future<Response> callService(
String name, {
String? isolateId,
Map<String, dynamic>? args,
}) async {
final registered = _registeredMethodsForService[name] ?? const [];
if (registered.isEmpty) {
throw Exception('There are no registered methods for service "$name"');
}
return service!.callMethod(
registered.first,
isolateId: isolateId,
args: args,
);
}