Map<String, dynamic> toMap() { return { 'messageList': messageList.map((item) => item.toMap()).toList(), 'nextMessage': nextMessage?.toMap(), }; }