apk
This commit is contained in:
parent
b297e12b4b
commit
4b8aff50c6
2 changed files with 18 additions and 1 deletions
Binary file not shown.
|
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_rustore_billing/pigeons/rustore.dart';
|
||||
import 'package:in_app_purchase/in_app_purchase.dart';
|
||||
import 'package:mnemo_cards_common/mnemo_cards_common.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import '../../di/injector.dart';
|
||||
import '../../di/locator.dart';
|
||||
|
|
@ -64,7 +65,23 @@ class InAppPurchaseService {
|
|||
}
|
||||
final controller = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..loadRequest(Uri.parse(paymentUrl));
|
||||
..loadRequest(Uri.parse(paymentUrl))
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onNavigationRequest: (request) async {
|
||||
final url = request.url;
|
||||
if (url.startsWith('http')) {
|
||||
return NavigationDecision.navigate;
|
||||
} else {
|
||||
if (await canLaunchUrlString(url)) {
|
||||
launchUrlString(url);
|
||||
return NavigationDecision.prevent;
|
||||
}
|
||||
return NavigationDecision.navigate;
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
return showModalBottomSheet(
|
||||
context: context ?? scaffoldKey.currentContext!,
|
||||
enableDrag: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue