Added category add/remove (no recolour/rename for now)

This commit is contained in:
Imran Remtulla
2022-12-21 03:08:56 -05:00
parent e2f99c5e71
commit 99d7595f2d
3 changed files with 126 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ class App {
late Map<String, String> additionalSettings;
late DateTime? lastUpdateCheck;
bool pinned = false;
String? category;
App(
this.id,
this.url,
@@ -58,7 +59,8 @@ class App {
this.preferredApkIndex,
this.additionalSettings,
this.lastUpdateCheck,
this.pinned);
this.pinned,
{this.category});
@override
String toString() {
@@ -107,7 +109,8 @@ class App {
json['lastUpdateCheck'] == null
? null
: DateTime.fromMicrosecondsSinceEpoch(json['lastUpdateCheck']),
json['pinned'] ?? false);
json['pinned'] ?? false,
category: json['category']);
}
Map<String, dynamic> toJson() => {
@@ -121,7 +124,8 @@ class App {
'preferredApkIndex': preferredApkIndex,
'additionalSettings': jsonEncode(additionalSettings),
'lastUpdateCheck': lastUpdateCheck?.microsecondsSinceEpoch,
'pinned': pinned
'pinned': pinned,
'category': category
};
}