PaymentProvider.fromJson constructor

PaymentProvider.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PaymentProvider.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case PaymentProviderSmartGlocal.CONSTRUCTOR:
      return PaymentProviderSmartGlocal.fromJson(json);
    case PaymentProviderStripe.CONSTRUCTOR:
      return PaymentProviderStripe.fromJson(json);
    case PaymentProviderOther.CONSTRUCTOR:
      return PaymentProviderOther.fromJson(json);
    default:
      return const PaymentProvider();
  }
}