getAgentById method
Implementation
Future<Agent> getAgentById(String agentId) async {
try {
final agent = await _agentService.getAgentById(agentId);
print("agent in settings ${agent.name}");
return agent;
} catch (e) {
print('Error fetching agent: $e');
rethrow;
}
}