BidiGenerateContentToolCall.fromJson constructor
BidiGenerateContentToolCall.fromJson(
- Object? j
Implementation
factory BidiGenerateContentToolCall.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return BidiGenerateContentToolCall(
functionCalls: switch (json['functionCalls']) {
null => [],
List<Object?> $1 => [for (final i in $1) FunctionCall.fromJson(i)],
_ => throw const FormatException('"functionCalls" is not a list'),
},
);
}