https://github.com/juspay/hyper-webview-flutter
Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView
https://github.com/juspay/hyper-webview-flutter
Last synced: 11 months ago
JSON representation
Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView
- Host: GitHub
- URL: https://github.com/juspay/hyper-webview-flutter
- Owner: juspay
- License: agpl-3.0
- Created: 2023-12-26T08:18:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T11:24:18.000Z (almost 2 years ago)
- Last Synced: 2025-06-22T16:57:50.080Z (about 1 year ago)
- Language: Kotlin
- Size: 151 KB
- Stars: 5
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Hyper WebView Flutter
A Flutter Plugin that enables UPI Intent App transactions in [Juspay's Paymentpage](https://juspay.in/) inside the Flutter webview widget.
### Flutter Setup
Add flutter plugin dependency in `pubspec.yaml`.
Get dependency from [pub.dev](https://pub.dev/packages/hyper_webview_flutter/install)
## Usage
### Step 1:
Import `hyper_webview_flutter` package in your dart file where WebViewController is being instanciated.
```dart
import 'package:hyper_webview_flutter/hyper_webview_flutter.dart';
```
### Step2:
Instantiate a HyperWebviewFlutter object provided by this plugin.
```dart
HyperWebviewFlutter hyperWebviewFlutterPlugin = HyperWebviewFlutter();
```
### Step 3:
Provide the [webview Controller](https://pub.dev/documentation/webview_flutter/latest/webview_flutter/WebViewController-class.html) to the attach() function of the HyperWebviewFlutter object.
```dart
class _WebviewPaymentPageState extends State {
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();
}
}
```
### Step 4:
Utilize this controller to render the PaymentPage within the WebView.
## License
hyper_webview_flutter is distributed under [AGPL-3.0-only](https://pub.dev/packages/hypersdkflutter/license) license.