navigateWebUrl method
Returns the web directions URL. If you request the obtained URL to your browser, you can guide the way even in an environment where the KakaoNavi app is not installed.
Implementation
Future<Uri> navigateWebUrl(Location location,
{NaviOption? option, List<Location>? viaList}) async {
final naviParams =
KakaoNaviParams(location, option: option, viaList: viaList);
final extras = {
'KA': await KakaoContext.kaHeader,
...(_platform.isAndroid
? {
"appPkg": await KakaoContext.packageName,
"keyHash": await KakaoContext.origin
}
: _platform.isIOS
? {"appPkg": await KakaoContext.origin}
: {})
};
final params = {
'param': jsonEncode(naviParams),
'apiver': '1.0',
'appkey': KakaoContext.clientId,
'extras': jsonEncode(extras)
};
final url = Uri.https(NAVI_HOSTS, 'navigate.html', params);
return Uri.parse(url.toString().replaceAll('+', '%20'));
}