OpenIdConfiguration.fromJson constructor Null safety

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

Implementation

factory OpenIdConfiguration.fromJson(Map<String, dynamic> json) =>
    OpenIdConfiguration(
      document: json,
      issuer: json["issuer"].toString(),
      jwksUri: json["jwks_uri"].toString(),
      authorizationEndpoint: json["authorization_endpoint"].toString(),
      tokenEndpoint: json["token_endpoint"].toString(),
      userInfoEndpoint: json["userinfo_endpoint"].toString(),
      endSessionEndpoint: json["end_session_endpoint"]?.toString(),
      revocationEndpoint: json["revocation_endpoint"]?.toString(),
      registrationEndpoint: json["registration_endpoint"]?.toString(),
      mfaChallengeEndpoint: json["mfa_challenge_endpoint"]?.toString(),
      deviceAuthorizationEndpoint:
          json["device_authorization_endpoint"]?.toString(),
      scopesSupported:
          List<String>.from(json["scopes_supported"] as List<dynamic>),
      claimsSupported:
          List<String>.from(json["claims_supported"] as List<dynamic>),
      grantTypesSupported: json["grant_types_supported"] == null
          ? null
          : List<String>.from(json["grant_types_supported"] as List<dynamic>),
      responseTypesSupported: json["response_types_supported"] == null
          ? List<String>.empty()
          : List<String>.from(
              json["response_types_supported"] as List<dynamic>),
      responseModesSupported: json["response_modes_supported"] == null
          ? List<String>.empty()
          : List<String>.from(
              json["response_modes_supported"] as List<dynamic>),
      apiEndpoints: json["api_endpoint"] == null
          ? null
          : json["api_endpoint"] is List<dynamic>
              ? List<String>.from(json["api_endpoint"] as List<dynamic>)
              : [json["api_endpoint"]!.toString()],
      checkSessionIFrame: json["check_session_iframe"]?.toString(),
      codeChallengeMethodsSupported: List<String>.from(
          (json["code_challenge_methods_supported"] ?? <List<String>>[])
              as List<dynamic>),
      idTokenSigningAlgValuesSupported: List<String>.from(
          (json["id_token_signing_alg_values_supported"] ?? <List<String>>[])
              as List<dynamic>),
      subjectTypesSupported: List<String>.from(
          (json["subject_types_supported"] ?? <List<String>>[])
              as List<dynamic>),
      tokenEndpointAuthMethodsSupported: List<String>.from(
          (json["token_endpoint_auth_methods_supported"] ?? <List<String>>[])
              as List<dynamic>),
      requestUriParameterSupported:
          (json["request_uri_parameter_supported"] ?? false) as bool,
    );