updateBookmark method

Future<bool> updateBookmark(
  1. CPDFBookmark bookmark
)

Updates an existing bookmark with the specified title and page index. Parameters:

  • bookmark The bookmark object containing the updated title and page index. example:
List<CPDFBookmark> bookmarks = await document.getBookmarks();
if (bookmarks.isNotEmpty) {
  CPDFBookmark bookmark = bookmarks.first;
  bookmark.setTitle('Updated Title');
  bool result = await document.updateBookmark(bookmark);
}

Implementation

Future<bool> updateBookmark(CPDFBookmark bookmark) async {
  return await _channel.invokeMethod('update_bookmark', bookmark.toJson());
}