fromJson static method

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

Implementation

static InputCredentials? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case InputCredentialsApplePay.constructor:
      return InputCredentialsApplePay.fromJson(json);

    case InputCredentialsGooglePay.constructor:
      return InputCredentialsGooglePay.fromJson(json);

    case InputCredentialsNew.constructor:
      return InputCredentialsNew.fromJson(json);

    case InputCredentialsSaved.constructor:
      return InputCredentialsSaved.fromJson(json);

    default:
      return null;
  }
}