talkWithResponse method
Future<Uri>
talkWithResponse
(LinkResponse response, { String clientId, Map<String, String> serverCallbackArgs })
Implementation
Future<Uri> talkWithResponse(LinkResponse response,
{String clientId, Map<String, String> serverCallbackArgs}) async {
final attachmentSize = _attachmentSize(response,
clientId: clientId, serverCallbackArgs: serverCallbackArgs);
if (attachmentSize > 10 * 1024) {
throw KakaoClientException(
"Exceeded message template v2 size limit (${attachmentSize / 1024}kb > 10kb).");
}
final params = {
"linkver": "4.0",
"appkey": clientId ?? KakaoContext.clientId,
"appver": await KakaoContext.appVer,
"template_id": response.templateId,
"template_args": response.templateArgs,
"template_json": response.templateMsg,
"extras": _extras(serverCallbackArgs)
};
return Uri(scheme: "kakaolink", host: "send", queryParameters: params);
}