sendMethodResult method
Implementation
void sendMethodResult(int id, Map<String, dynamic> result) {
// Find the connection that made this request
// For now, broadcast to all connections
final response = {
'id': id,
'result': result,
};
final message = jsonEncode(response);
for (final connection in _connections.values) {
try {
connection.sink.add(message);
} catch (e) {
print('Error sending result: $e');
}
}
}