payment_dialog 1.0.5 copy "payment_dialog: ^1.0.5" to clipboard
payment_dialog: ^1.0.5 copied to clipboard

A customizable Flutter payment dialog with WebView for handling online payments.

Payment Dialog.

A simple Flutter package for displaying customizable payment dialogs in your app.

Payment dialog for Flutter Payment dialog for Flutter Payment dialog for Flutter Payment dialog for Flutter


Features #

  • Show a payment confirmation dialog.
  • Customize title, message, and buttons.

Quickstart #

Add dependency to your pubspec file #

Add this to your pubspec.yaml:

dependencies:
  payment_dialog: ^1.0.0

Add PaymentDialog to your app #

import 'package:flutter/material.dart';
import 'package:payment_dialog/payment_dialog.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              final success = await showPaymentDialog(
                context: context,
                paymentUrl: 'https://yourpaymentgateway.com/start',
                succeededUrl: 'https://your-payment-website.com/success',
                failedUrl: 'https://your-payment-website.com/failed',
                cancelledUrl: 'https://your-payment-website.com/cancelled',
              );
              debugPrint(success ? "Payment Success" : "Payment Failed/Cancelled");
            },
            child: const Text("Pay Now"),
          ),
        ),
      ),
    );
  }
}
3
likes
140
points
112
downloads
screenshot

Publisher

verified publisherprogrammerhasan.com

Weekly Downloads

A customizable Flutter payment dialog with WebView for handling online payments.

Repository (GitHub)
View/report issues

Topics

#payment #online-payment-gateways #customizable-dialog

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, motion_toast

More

Packages that depend on payment_dialog