fromUidTypeContent static method

Message fromUidTypeContent(
  1. String uid,
  2. String type,
  3. String content
)

Implementation

static Message fromUidTypeContent(String uid, String type, String content) {
  return Message(
    uid: uid,
    type: type,
    content: content,
    status: BytedeskConstants.MESSAGE_STATUS_SENDING,
    createdAt: BytedeskUtils.formatedDateNow(),
    client: BytedeskUtils.getClient(),
    extra: '',
    user: UserProtobuf(
      uid: SpUtil.getString(BytedeskConstants.VISITOR_UID)!,
      nickname: SpUtil.getString(BytedeskConstants.VISITOR_NICKNAME)!,
      avatar: SpUtil.getString(BytedeskConstants.VISITOR_AVATAR)!,
    )
  );
}