Hibok
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

38 wiersze
750 B

  1. class RobotChatModel {
  2. var msgContent;
  3. int extraInfo;
  4. bool isMe;
  5. int type;//0文本,1声音
  6. RobotChatModel({this.msgContent, this.extraInfo,this.isMe,this.type=0});
  7. fromJson(Map<String, dynamic> json) {
  8. msgContent = json['msgContent'];
  9. }
  10. }
  11. class RobotChatMgr {
  12. static RobotChatMgr _instance;
  13. static RobotChatMgr _getInstance() {
  14. if (_instance == null) {
  15. _instance = RobotChatMgr._();
  16. }
  17. return _instance;
  18. }
  19. factory RobotChatMgr() => _getInstance();
  20. RobotChatMgr._();
  21. List<RobotChatModel> robotChatList = [];
  22. addSource(RobotChatModel msg) {
  23. robotChatList.insert(0,msg);
  24. }
  25. addTranslate(RobotChatModel msg) {
  26. robotChatList.insert(0,msg);
  27. }
  28. }