createAgent method

Future<String> createAgent(
  1. Agent agent,
  2. String connectorName
)

Implementation

Future<String> createAgent(Agent agent ,String connectorName) async {
  String agentId = await _agentService.createAgent(agent , connectorName);
  agent = agent.copyWith(id: agentId);

  _agents.add(agent);
  notifyListeners();
  return agentId;

}