mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
27 lines
730 B
Dart
27 lines
730 B
Dart
import 'package:PiliPlus/models_new/article/article_info/stats.dart';
|
|
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
|
|
|
class ArticleInfoData {
|
|
bool? favorite;
|
|
Stats? stats;
|
|
String? title;
|
|
List<String>? originImageUrls;
|
|
|
|
ArticleInfoData({
|
|
this.favorite,
|
|
this.stats,
|
|
this.title,
|
|
this.originImageUrls,
|
|
});
|
|
|
|
factory ArticleInfoData.fromJson(Map<String, dynamic> json) =>
|
|
ArticleInfoData(
|
|
favorite: json['favorite'] as bool?,
|
|
stats: json['stats'] == null
|
|
? null
|
|
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
|
title: json['title'] as String?,
|
|
originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(),
|
|
);
|
|
}
|