added extra fields in news objects
This commit is contained in:
parent
fe3ed31830
commit
a50f449f7c
@ -22,7 +22,7 @@ class FilcAPI {
|
|||||||
|
|
||||||
// Public API
|
// Public API
|
||||||
static const schoolList = "$baseUrl/v3/public/school-list";
|
static const schoolList = "$baseUrl/v3/public/school-list";
|
||||||
static const news = "$baseUrl/v3/public/news";
|
static const news = "$baseUrl/v4/public/news";
|
||||||
static const supporters = "$baseUrl/v3/public/supporters";
|
static const supporters = "$baseUrl/v3/public/supporters";
|
||||||
|
|
||||||
// Private API
|
// Private API
|
||||||
|
@ -7,6 +7,8 @@ class News {
|
|||||||
String platform;
|
String platform;
|
||||||
bool emergency;
|
bool emergency;
|
||||||
DateTime expireDate;
|
DateTime expireDate;
|
||||||
|
List<String>? appVersions;
|
||||||
|
String? specificAppId;
|
||||||
Map? json;
|
Map? json;
|
||||||
|
|
||||||
News({
|
News({
|
||||||
@ -18,6 +20,8 @@ class News {
|
|||||||
required this.platform,
|
required this.platform,
|
||||||
required this.emergency,
|
required this.emergency,
|
||||||
required this.expireDate,
|
required this.expireDate,
|
||||||
|
this.appVersions,
|
||||||
|
this.specificAppId,
|
||||||
this.json,
|
this.json,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -31,6 +35,10 @@ class News {
|
|||||||
platform: json["platform"] ?? "",
|
platform: json["platform"] ?? "",
|
||||||
emergency: json["emergency"] ?? false,
|
emergency: json["emergency"] ?? false,
|
||||||
expireDate: DateTime.parse(json["expire_date"] ?? ''),
|
expireDate: DateTime.parse(json["expire_date"] ?? ''),
|
||||||
|
appVersions: json["app_versions"] != null
|
||||||
|
? List<String>.from(json["app_versions"])
|
||||||
|
: null,
|
||||||
|
specificAppId: json["specific_app_id"],
|
||||||
json: json,
|
json: json,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user