hyper_webview_flutter 0.0.1 hyper_webview_flutter: ^0.0.1 copied to clipboard
Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView.
Hyper SDK WebView Flutter #
A Flutter Plugin that enables merchants to open Juspay's Paymentpage inside the webview widget.
Flutter Setup #
- Begin by including the Hyper SDK WebView Flutter plugin in your project's pubspec.yaml file. Obtain the necessary dependency here
- Instantiate a HyperWebviewFlutter object provided by this plugin.
- 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 = HyperWebviewFlutter();
widget._hyperWebviewFlutterPlugin.attach(_controller);
super.initState();
}
- Utilize this controller to render the PaymentPage within the WebView.