paymentSuccess method
Implementation
Widget paymentSuccess() {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Success image
CachedNetworkImage(
imageUrl:
"https://smatsure-live-icz.s3.af-south-1.amazonaws.com/success.png",
placeholder:
(context, url) => CircularProgressIndicator(),
// Placeholder while loading
errorWidget:
(context, url, error) => Icon(Icons.error),
// Error widget if image fails
fit: BoxFit.contain,
height: 50,
width:
100, // You can adjust this to your preferred fit
),
const SizedBox(height: 24),
// Success text
const Text(
'Payment Successful!',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Colors.purple,
),
),
const SizedBox(height: 16),
const Text(
'Thank you for your payment.',
style: TextStyle(fontSize: 16, color: Colors.purple),
),
],
),
);
}