DraftMessage constructor

DraftMessage({
  1. String? id,
  2. String? text,
  3. String type = MessageType.regular,
  4. List<Attachment> attachments = const [],
  5. String? parentId,
  6. bool? showInChannel,
  7. List<User> mentionedUsers = const [],
  8. Message? quotedMessage,
  9. String? quotedMessageId,
  10. bool silent = false,
  11. String? command,
  12. Poll? poll,
  13. String? pollId,
  14. Map<String, Object?> extraData = const {},
})

Creates a new draft message.

Implementation

DraftMessage({
  String? id,
  this.text,
  String type = MessageType.regular,
  this.attachments = const [],
  this.parentId,
  this.showInChannel,
  this.mentionedUsers = const [],
  this.quotedMessage,
  String? quotedMessageId,
  this.silent = false,
  this.command,
  this.poll,
  String? pollId,
  this.extraData = const {},
}) : id = id ?? const Uuid().v4(),
     type = MessageType(type),
     _quotedMessageId = quotedMessageId,
     _pollId = pollId;