paymentFailed method

Widget paymentFailed(
  1. PaymentViewModel model
)

Implementation

Widget paymentFailed(PaymentViewModel model) {
  return Center(
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        // Success image
        CachedNetworkImage(
          imageUrl:
          "https://smatsure-live-icz.s3.af-south-1.amazonaws.com/payment_failed.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 Failed!',
          style: TextStyle(
            fontSize: 24,
            fontWeight: FontWeight.bold,
            color: Colors.red,
          ),
        ),

        const SizedBox(height: 16),

        Text(
          model.paymentFailedReason,
          style: TextStyle(fontSize: 16, color: Colors.red),
        ),
      ],
    ),
  );
}