orderpayment
This commit is contained in:
31
lib/src/ui/payment/payment_webView.dart
Normal file
31
lib/src/ui/payment/payment_webView.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
class PaymentWebView extends StatefulWidget {
|
||||
final String paymentUrl;
|
||||
|
||||
PaymentWebView({required this.paymentUrl});
|
||||
|
||||
@override
|
||||
_PaymentWebViewState createState() => _PaymentWebViewState();
|
||||
}
|
||||
|
||||
class _PaymentWebViewState extends State<PaymentWebView> {
|
||||
InAppWebViewController? webViewController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text("Complete Your Payment")),
|
||||
body: InAppWebView(
|
||||
initialUrlRequest: URLRequest(url: WebUri.uri(Uri.parse(widget.paymentUrl))),
|
||||
onWebViewCreated: (controller) {
|
||||
webViewController = controller;
|
||||
},
|
||||
onLoadStop: (controller, url) async {
|
||||
print("Payment page loaded: $url");
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user