pay_success_alert 0.0.3
pay_success_alert: ^0.0.3 copied to clipboard
A custom payment success alert.
This is a Flutter package that can be used for displaying a payment success dialog.
Features #
- Customizable payment success alert dialog.
- Easy to integrate into any Flutter project.
- Supports custom styling
Getting started #
To start using the pay_success_alert package, add it to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
pay_success_alert:
## Usage
import 'package:flutter/material.dart';
import 'package:pay_success_alert/pay_success_alert.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Payment Success Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Payment Success Example'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
showDialog(
context: context,
builder: (BuildContext context) {
return PaymentSuccessDialog(onOkPressed: () {});
},
);
},
child: Text('Show Payment Success Dialog'),
),
),
);
}
}
## Additional information
A custom pay success alert that can be used on payment pages