toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = {};
  if (clientId != null) {
    jsonObject['client_id'] = clientId;
  }
  if (responseType != null) {
    jsonObject['response_type'] = responseType;
  }
  if (responseMode != null) {
    jsonObject['response_mode'] = responseMode;
  }

  if (redirectUri != null) {
    jsonObject['redirect_uri'] = redirectUri;
  }
  if (nonce != null) {
    jsonObject['nonce'] = nonce;
  }
  if (presentationDefinitionUri != null) {
    jsonObject['presentation_definition_uri'] = presentationDefinitionUri;
  }
  if (presentationDefinition != null) {
    jsonObject['presentation_definition'] = presentationDefinition!.toJson();
  }
  return jsonObject;
}