setAttachment method Null safety

void setAttachment(
  1. NIMMessageAttachment attachment
)

Implementation

void setAttachment(NIMMessageAttachment attachment) {
  attach = jsonEncode(attachment.toMap());
}