addBookmark method

Future<bool> addBookmark({
  1. required String title,
  2. required int pageIndex,
})

Adds a bookmark with the specified title and page index. Parameters:

  • title The title of the bookmark.
  • pageIndex The index of the page to which the bookmark should point. example:
bool result = await document.addBookmark(title: 'My Bookmark', pageIndex: 0);

Implementation

Future<bool> addBookmark({
  required String title,
  required int pageIndex,
}) async {
  return await _channel.invokeMethod('add_bookmark', {
    'title': title,
    'page_index': pageIndex,
  });
}