class MentionData { int id; String fullName; String text; String createdAt; List mentions; MentionData( {required this.id, required this.text, required this.createdAt, required this.fullName, required this.mentions}); factory MentionData.fromJson(Map json) => MentionData( id: json['id'], text: json['text'], createdAt: json['createdAt'], fullName: json['fullName'], mentions: json['mentions'], ); Map toJson() => { 'id': id, 'text': text, 'createdAt': createdAt, 'fullName': fullName, 'mentions': mentions, }; }