fromMap static method
_g
fromMap(
- _5 r
Implementation
static _g fromMap(_5 r){_;_5 m=r.$nn;return _g(message: m.$c(_S[13])? _1.a<_o>(m[_S[13]],(m)=>$AgentMessage.fromMap(m))!:throw __x(_S[18],_S[13]),realCost: m.$c(_S[14])? _1.a<_f>(m[_S[14]],(m)=>$ARational.fromMap(m))!:throw __x(_S[18],_S[14]),finishReason: m.$c(_S[15]) ? _1.e(ChatFinishReason.values, m[_S[15]]) as ChatFinishReason : _V[2],metadata: m.$c(_S[16]) ? _1.fe((m[_S[16]] as Map).$e.$m((e)=>_1e(e.key,e.value))) : _V[3],usage: m.$c(_S[17]) ? _1.a<_h>(m[_S[17]],(m)=>$ChatUsage.fromMap(m))! : _V[4],);}