| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import 'package:e2ee_chat/common/global.dart';
- import 'package:flutter/cupertino.dart';
- enum DTMessageType {
- text,
- image
- }
- class MessageListModel extends ChangeNotifier {
- List items = <MessageItemModel>[];
- 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;
- }
|