OutOfBandMessage constructor
OutOfBandMessage({
- String? id,
- required String from,
- String? goalCode,
- String? goal,
- List<
DidcommProfiles> ? accept = const [DidcommProfiles.v2], - List<
Attachment> ? attachments, - String? replyUrl,
- List<
String> ? replyTo, - String? parentThreadId,
- String? threadId,
- List<
String> ? to, - DateTime? createdTime,
- DateTime? expiresTime,
- bool pleaseAck = false,
- FromPriorJWT? fromPrior,
- Map<
String, dynamic> ? additionalHeaders, - DidcommMessageTyp? typ,
- WebRedirect? webRedirect,
- ReturnRouteValue? returnRoute,
Implementation
OutOfBandMessage(
{String? id,
required String super.from,
this.goalCode,
this.goal,
this.accept = const [DidcommProfiles.v2],
super.attachments,
super.replyUrl,
super.replyTo,
super.parentThreadId,
super.threadId,
List<String>? super.to,
super.createdTime,
super.expiresTime,
super.pleaseAck,
super.fromPrior,
super.additionalHeaders,
DidcommMessageTyp? typ,
super.webRedirect,
super.returnRoute})
: super(
id: id ?? Uuid().v4(),
type: DidcommMessages.invitation,
body: {},
typ: DidcommMessageTyp.plain) {
if (goal != null) body['goal'] = goal;
if (goalCode != null) body['goal_code'] = goalCode;
List<String> tmp = [];
for (var p in accept!) {
tmp.add(p.value);
}
body['accept'] = tmp;
}