QueryMessage constructor

QueryMessage({
  1. String? id,
  2. String? parentThreadId,
  3. List<String>? ack,
  4. required List<Query> queries,
  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

QueryMessage(
    {String? id,
    super.parentThreadId,
    super.ack,
    required this.queries,
    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.discoverFeatureQuery,
          body: {}) {
  List<Map<String, dynamic>> q = [];
  for (var query in queries) {
    q.add(query.toJson());
  }
  body['queries'] = q;
}