RequestObject.fromJson constructor

RequestObject.fromJson(
  1. dynamic data
)

Implementation

RequestObject.fromJson(dynamic data) {
  var jsonObject = credentialToMap(data);

  responseType = jsonObject['response_type'];
  clientId = jsonObject['client_id'];
  responseMode = jsonObject['response_mode'];
  redirectUri = jsonObject['redirect_uri'];
  nonce = jsonObject['nonce'];
  presentationDefinitionUri = jsonObject['presentation_definition_uri'];

  if (jsonObject.containsKey('presentation_definition')) {
    presentationDefinition = PresentationDefinition.fromJson(
        jsonObject['presentation_definition']);
  }
}