hyper_webview_flutter 0.0.5 copy "hyper_webview_flutter: ^0.0.5" to clipboard
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.

1
likes
160
points
5.24k
downloads

Publisher

verified publisherapp-dev.juspay.in

Weekly Downloads

2024.07.06 - 2025.01.18

Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView.

Homepage
Repository (GitHub)

Documentation

API reference

License

AGPL-3.0 (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on hyper_webview_flutter