forText static method

NotificationParams forText(
  1. String text,
  2. String whomToNotify, {
  3. bool shouldEncrypt = false,
})

Returns NotificationParams to send a text message to another atSign. forText notifications are case-sensitive platform level lower case enforcement will not apply to forText notifications

Implementation

static NotificationParams forText(String text, String whomToNotify,
    {bool shouldEncrypt = false}) {
  var atKey = AtKey()
    ..key = text
    ..sharedWith = whomToNotify
    ..metadata = (Metadata()..isEncrypted = shouldEncrypt);
  return NotificationParams()
    .._id = Uuid().v4()
    .._atKey = atKey
    .._operation = OperationEnum.update
    .._messageType = MessageTypeEnum.text;
}