import 'package:e2ee_chat/common/global.dart'; import 'package:flutter/cupertino.dart'; enum DTMessageType { text, image } class MessageListModel extends ChangeNotifier { List items = []; int get count => items.length; } class MessageItemModel { MessageItemModel({required this.chatId, required this.userId, required this.userName, required this.chatName, required this.message, required this.messageType, required this.time, this.unReadCount = 0, this.isSingle = false, this.avatar, this.isGroup = false, this.isDisturbing = false, this.isSpecialAttention = false, this.isAtYou = false, this.isAtAll = false, this.isStick = false}); /// 聊天 Id String chatId; /// 用户名称 String userName; /// 用户Id String userId; /// 聊天名称 String chatName; /// 消息体 String message; /// message type DTMessageType messageType; /// 时间 int time; /// 未读数量 int unReadCount; /// 单聊 bool isSingle; Image? avatar; /// 群聊信息 bool isGroup; /// 消息免打扰 bool isDisturbing; /// 是否为置顶 bool isStick; /// 特别关注 bool isSpecialAttention; /// 是否 @ 你 bool isAtYou; /// 是否 @ 全部 bool isAtAll; }