getActiveAgent method

({String description, String id, DateTime startTime})? getActiveAgent(
  1. String agentId
)

Get info about an active agent by ID. Returns null if not active.

Implementation

({String id, String description, DateTime startTime})? getActiveAgent(
  String agentId,
) {
  final agent = _activeAgents[agentId];
  if (agent == null) return null;
  return (
    id: agent.id,
    description: agent.description,
    startTime: agent.startTime,
  );
}