Added share and unshare bookmarks

This commit is contained in:
Juan Gilsanz Polo
2024-02-27 18:20:00 +01:00
parent 5ab3b59152
commit 3f298cc22d
17 changed files with 390 additions and 9 deletions

View File

@@ -0,0 +1,50 @@
class PatchBookmarkData {
final String? url;
final String? title;
final String? description;
final bool? isArchived;
final bool? unread;
final bool? shared;
final String? tagNames;
final String? notes;
const PatchBookmarkData({
this.url,
this.title,
this.description,
this.isArchived,
this.unread,
this.shared,
this.tagNames,
this.notes,
});
Map<String, dynamic> toJson() {
Map<String, dynamic> ret = {};
if (url != null) {
ret = {...ret, "url": url};
}
if (title != null) {
ret = {...ret, "title": title};
}
if (description != null) {
ret = {...ret, "description": description};
}
if (isArchived != null) {
ret = {...ret, "is_archived": isArchived};
}
if (unread != null) {
ret = {...ret, "unread": unread};
}
if (shared != null) {
ret = {...ret, "shared": shared};
}
if (notes != null) {
ret = {...ret, "notes": notes};
}
if (tagNames != null) {
ret = {...ret, "notag_namestes": tagNames};
}
return ret;
}
}