DiscloseMessage constructor

DiscloseMessage({
  1. String? id,
  2. String? parentThreadId,
  3. List<String>? ack,
  4. required List<Disclosure> disclosures,
  5. String? replyUrl,
  6. List<String>? replyTo,
  7. String? threadId,
  8. String? from,
  9. List<String>? to,
  10. DateTime? createdTime,
  11. DateTime? expiresTime,
  12. bool pleaseAck = false,
  13. FromPriorJWT? fromPrior,
  14. Map<String, dynamic>? additionalHeaders,
  15. WebRedirect? webRedirect,
  16. ReturnRouteValue? returnRoute,
  17. DidcommMessageTyp? typ,
})

Implementation

DiscloseMessage(
    {String? id,
    super.parentThreadId,
    super.ack,
    required this.disclosures,
    super.replyUrl,
    super.replyTo,
    super.threadId,
    super.from,
    List<String>? super.to,
    super.createdTime,
    super.expiresTime,
    super.pleaseAck,
    super.fromPrior,
    super.additionalHeaders,
    super.webRedirect,
    super.returnRoute,
    super.typ})
    : super(
          id: id ?? Uuid().v4(),
          type: DidcommMessages.discoverFeatureDisclose,
          body: {}) {
  List<Map<String, dynamic>> d = [];
  for (var dis in disclosures) {
    d.add(dis.toJson());
  }
  body['disclosures'] = d;
}