hyper_webview_flutter 0.0.5 hyper_webview_flutter: ^0.0.5 copied to clipboard
Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView.
Hyper WebView Flutter #
A Flutter Plugin that enables UPI Intent App transactions in Juspay's Paymentpage inside the Flutter webview widget.
Flutter Setup #
Add flutter plugin dependency in pubspec.yaml
.
Get dependency from pub.dev
Usage #
Step 1: #
Import hyper_webview_flutter
package in your dart file where WebViewController is being instanciated.
import 'package:hyper_webview_flutter/hyper_webview_flutter.dart';
copied to clipboard
Step2: #
Instantiate a HyperWebviewFlutter object provided by this plugin.
HyperWebviewFlutter hyperWebviewFlutterPlugin = HyperWebviewFlutter();
copied to clipboard
Step 3: #
Provide the webview Controller to the attach() function of the HyperWebviewFlutter object.
class _WebviewPaymentPageState extends State<WebviewPaymentPage> {
late WebViewController _controller;
@override
void initState() {
var url = Uri.parse(widget.url);
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(url);
widget.hyperWebviewFlutterPlugin.attach(_controller);
super.initState();
}
}
copied to clipboard
Step 4: #
Utilize this controller to render the PaymentPage within the WebView.
License #
hyper_webview_flutter is distributed under AGPL-3.0-only license.