Last updated:
0 purchases
hyper webview flutter
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.