This commit is contained in:
lollipopkit
2023-08-08 17:46:04 +08:00
parent 159942de95
commit d35d106ad4
7 changed files with 94 additions and 66 deletions

View File

@@ -34,13 +34,11 @@ class AppUpdate {
required this.changelog,
required this.build,
required this.url,
required this.sha256,
});
final AppUpdatePlatformSpecific<String> changelog;
final Build build;
final AppUpdatePlatformSpecific<String> url;
final AppUpdatePlatformSpecific<String?> sha256;
factory AppUpdate.fromRawJson(String str) =>
AppUpdate.fromJson(json.decode(str));
@@ -51,14 +49,12 @@ class AppUpdate {
changelog: AppUpdatePlatformSpecific.fromJson(json["changelog"]),
build: Build.fromJson(json["build"]),
url: AppUpdatePlatformSpecific.fromJson(json["url"]),
sha256: AppUpdatePlatformSpecific.fromJson(json["sha256"]),
);
Map<String, dynamic> toJson() => {
"changelog": changelog.toJson(),
"build": build.toJson(),
"url": url.toJson(),
"sha256": sha256.toJson(),
};
}