toJson method
Implementation
@override
Map<String, dynamic> toJson() {
var map = {
'id': id,
'spec_version': specVersion,
'issuer': issuer.toJson(),
'output_descriptors': List.generate(
outputDescriptor.length, (index) => outputDescriptor[index].toJson())
};
if (name != null) {
map['name'] = name!;
}
if (description != null) {
map['description'] = description!;
}
if (format != null) {
map['format'] = format!.toJson();
}
if (presentationDefinition != null) {
map['presentation_definition'] = presentationDefinition!.toJson();
}
return map;
}