onNavigationRequest: (NavigationRequest request) { print('test:dd'); if (request.url.startsWith('https') || request.url.startsWith("http")) { // 표준 웹 URL 체크 return NavigationDecision.navigate; } tossPaymentsWebview(request.url); // 그 외의 경우에는 tossPaymentsWebvew 함수로 검증 return NavigationDecision.prevent; },
tossPaymentsWebview(url) { final appScheme = ConvertUrl(url); // Intent URL을 앱 스킴 URL로 변환 print('applink : ${appScheme.url}'); if (appScheme.isAppLink()) { // 앱 스킴 URL인지 확인 appScheme.launchApp(mode: LaunchMode.externalApplication); // 앱 설치 상태에 따라 앱 실행 또는 마켓으로 이동 return NavigationDecision.prevent; } }