mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 11:06:51 +08:00
refa: article (#757)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
42
lib/models/dynamics/opus_detail/paragraph.dart
Normal file
42
lib/models/dynamics/opus_detail/paragraph.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
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<String, dynamic> json) => Paragraph(
|
||||
align: json['align'] as int?,
|
||||
paraType: json['para_type'] as int?,
|
||||
text: json['text'] == null
|
||||
? null
|
||||
: ParagraphText.fromJson(json['text'] as Map<String, dynamic>),
|
||||
pic: json['pic'] == null
|
||||
? null
|
||||
: Pic.fromJson(json['pic'] as Map<String, dynamic>),
|
||||
line: json['line'] == null ? null : Line.fromJson(json['line']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'align': align,
|
||||
'para_type': paraType,
|
||||
'text': text?.toJson(),
|
||||
'pic': pic?.toJson(),
|
||||
};
|
||||
}
|
||||
|
||||
class Line {
|
||||
Line({
|
||||
this.pic,
|
||||
});
|
||||
Pic? pic;
|
||||
|
||||
Line.fromJson(Map<String, dynamic> json) {
|
||||
pic = json['pic'] == null ? null : Pic.fromJson(json['pic']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user