mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
18 lines
429 B
Dart
18 lines
429 B
Dart
import 'node.dart';
|
|
|
|
class ParagraphText {
|
|
List<Node>? nodes;
|
|
|
|
ParagraphText({this.nodes});
|
|
|
|
factory ParagraphText.fromJson(Map<String, dynamic> json) => ParagraphText(
|
|
nodes: (json['nodes'] as List<dynamic>?)
|
|
?.map((e) => Node.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'nodes': nodes?.map((e) => e.toJson()).toList(),
|
|
};
|
|
}
|