PaymentProvider.fromJson constructor
a PaymentProvider return type can be :
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();
}
}