deleteAgent method

Future<void> deleteAgent(
  1. String id
)

Implementation

Future<void> deleteAgent(String id) async {
  await _agentService.deleteAgent(id);
  _agents.removeWhere((agent) => agent.id == id);
  notifyListeners();
}