PaymentResult.fromMap constructor

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

Constructs a PaymentResult object from a map representation.

Implementation

factory PaymentResult.fromMap(Map<String, dynamic> map) {
  return PaymentResult(
    status: _getStatusFromString(map['type'] ?? ''),
    message: _getMessageFromString(map['message'] ?? ''),
    error: _getErrorFromString(map['type'] ?? '', map['message'] ?? ''),
  );
}