addBookmark method
- BrowserBookmark bookmark
Add a selected bookmark to the database.
Implementation
Future<void> addBookmark(BrowserBookmark bookmark) async {
await _database.writeTxnSync(() async {
if (bookmark.id != null &&
_database.browserBookmarks.getSync(bookmark.id!) != null) {
_database.browserBookmarks.deleteSync(bookmark.id!);
}
_database.browserBookmarks.putSync(bookmark);
});
}