import 'pic.dart'; import 'text.dart'; class Paragraph { int? align; int? paraType; ParagraphText? text; Pic? pic; Line? line; Paragraph({this.align, this.paraType, this.text, this.pic, this.line}); factory Paragraph.fromJson(Map json) => Paragraph( align: json['align'] as int?, paraType: json['para_type'] as int?, text: json['text'] == null ? null : ParagraphText.fromJson(json['text'] as Map), pic: json['pic'] == null ? null : Pic.fromJson(json['pic'] as Map), line: json['line'] == null ? null : Line.fromJson(json['line']), ); Map toJson() => { 'align': align, 'para_type': paraType, 'text': text?.toJson(), 'pic': pic?.toJson(), }; } class Line { Line({ this.pic, }); Pic? pic; Line.fromJson(Map json) { pic = json['pic'] == null ? null : Pic.fromJson(json['pic']); } }