factory MessageList.fromMap(Map<String, dynamic> map) { return MessageList( total: map['total'], messages: List<Message>.from(map['messages'].map((p) => Message.fromMap(p))), ); }