PdfBookmark class Null safety

Each instance of this class represents an bookmark node in the bookmark tree.

//Create a new document.
PdfDocument document = PdfDocument();
//Create document bookmarks.
PdfBookmark bookmark = document.bookmarks.add('Page 1')
  ..destination = PdfDestination(document.pages.add(), Offset(20, 20))
  ..textStyle = [PdfTextStyle.bold]
  ..color = PdfColor(255, 0, 0);
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Inheritance

Properties

action PdfAction?
Gets or sets the action for the outline.
read / write
color PdfColor
Gets or sets the color of bookmark title.
read / write
count int
Gets number of the elements in the collection. Read-Only.
read-onlyinherited
destination PdfDestination?
Gets or sets the outline destination page.
read / write
hashCode int
The hash code for this object.
read-onlyinherited
isExpanded bool
Gets or sets whether to expand the node or not.
read / write
namedDestination PdfNamedDestination?
Gets or sets the named destination in outline.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
textStyle List<PdfTextStyle>
Gets or sets the style of the outline title.
read / write
title String
Gets or sets the outline title.
read / write

Methods

add(String title, {bool isExpanded = false, PdfColor? color, PdfDestination? destination, PdfNamedDestination? namedDestination, PdfAction? action, List<PdfTextStyle>? textStyle}) PdfBookmark
Adds the bookmark from the document.
inherited
clear() → void
Removes all the bookmark from the collection.
inherited
contains(PdfBookmark outline) bool
Determines whether the specified outline presents in the collection.
inherited
insert(int index, String title) PdfBookmark
Inserts a new outline at the specified index.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(String title) → void
Remove the specified bookmark from the document.
inherited
removeAt(int index) → void
Remove the bookmark from the document at the specified index.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) PdfBookmark
Gets the bookmark at specified index.
inherited