quick_payment 0.0.1
quick_payment: ^0.0.1 copied to clipboard
Flutter SDK for accepting Bangladeshi manual mobile banking payments like bKash, Nagad, Rocket, and Upay.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:quick_payment/core/_controller.dart';
import 'package:quick_payment/models/payment_method.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: const HomePage(),
debugShowCheckedModeBanner: false,
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Quick Payment Example")),
body: Center(
child: ElevatedButton(
onPressed: () {
QuickPayment.pay(
context: context,
amount: 200,
customerName: "Khalid",
feePercentage: 1.5,
methods: [
PaymentMethod.bkash("016xxxxxxxx"),
PaymentMethod.nagad("017xxxxxxxx"),
PaymentMethod.rocket("018xxxxxxxx"),
PaymentMethod.upay("019xxxxxxxx"),
],
onPaymentSubmitted: (data) {
print(data.toMap());
},
);
},
child: const Text("Pay Now"),
),
),
);
}
}