AgentResponseError.fromMap constructor

AgentResponseError.fromMap(
  1. Map<Object?, Object?> value
)

Implementation

factory AgentResponseError.fromMap(Map<Object?, Object?> value) {
  final decoded = AgentResponse.fromMap(value);
  if (decoded is! AgentResponseError) {
    throw const AcpWireDecodeException('Expected AgentResponseError.');
  }
  return decoded;
}