import 'package:PiliPlus/models_new/reply/control.dart'; import 'package:PiliPlus/models_new/reply/cursor.dart'; import 'package:PiliPlus/models_new/reply/reply.dart'; import 'package:PiliPlus/models_new/reply/top.dart'; import 'package:PiliPlus/models_new/reply/up_selection.dart'; import 'package:PiliPlus/models_new/reply/upper.dart'; class ReplyData { ReplyCursor? cursor; List? replies; Top? top; List? topReplies; UpSelection? upSelection; int? assist; int? blacklist; int? vote; Upper? upper; ReplyControl? control; int? note; dynamic esportsGradeCard; dynamic callbacks; String? contextFeature; ReplyData({ this.cursor, this.replies, this.top, this.topReplies, this.upSelection, this.assist, this.blacklist, this.vote, this.upper, this.control, this.note, this.esportsGradeCard, this.callbacks, this.contextFeature, }); factory ReplyData.fromJson(Map json) => ReplyData( cursor: json['cursor'] == null ? null : ReplyCursor.fromJson(json['cursor'] as Map), replies: (json['replies'] as List?) ?.map((e) => ReplyItemModel.fromJson(e as Map)) .toList(), top: json['top'] == null ? null : Top.fromJson(json['top'] as Map), topReplies: (json['top_replies'] as List?) ?.map((e) => ReplyItemModel.fromJson(e as Map)) .toList(), upSelection: json['up_selection'] == null ? null : UpSelection.fromJson(json['up_selection'] as Map), assist: json['assist'] as int?, blacklist: json['blacklist'] as int?, vote: json['vote'] as int?, upper: json['upper'] == null ? null : Upper.fromJson(json['upper'] as Map), control: json['control'] == null ? null : ReplyControl.fromJson(json['control'] as Map), note: json['note'] as int?, esportsGradeCard: json['esports_grade_card'] as dynamic, callbacks: json['callbacks'] as dynamic, contextFeature: json['context_feature'] as String?, ); }