import 'package:PiliPlus/models_new/reply/control.dart'; import 'package:PiliPlus/models_new/reply/reply.dart'; import 'package:PiliPlus/models_new/reply/upper.dart'; import 'package:PiliPlus/models_new/reply2reply/page.dart'; import 'package:PiliPlus/models_new/reply2reply/root.dart'; class ReplyReplyData { ReplyPage? page; Upper? upper; List? replies; ReplyRoot? root; ReplyControl? control; ReplyReplyData({ this.page, this.upper, this.replies, this.root, this.control, }); factory ReplyReplyData.fromJson(Map json) => ReplyReplyData( page: json['page'] == null ? null : ReplyPage.fromJson(json['page'] as Map), upper: json['upper'] == null ? null : Upper.fromJson(json['upper'] as Map), replies: (json['replies'] as List?) ?.map((e) => ReplyItemModel.fromJson(e as Map)) .toList(), root: json['root'] == null ? null : ReplyRoot.fromJson(json['root'] as Map), control: json['control'] == null ? null : ReplyControl.fromJson(json['control'] as Map), ); }