PaymentStatus.fromMap constructor

PaymentStatus.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory PaymentStatus.fromMap(Map<String, dynamic> map) {
  return PaymentStatus(
      message: map['message'] ??
          '', // Defaulting to an empty string if 'message' is null
      error: map['error'] ??
          '', // Defaulting to an empty string if 'provider' is null
      amount: map['amount'] ?? '',
      currency: map['currency'] ?? '',
      paid_at: map['paid_at'] ?? '');
}