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