color property

PdfColor color

Gets or sets the color of bookmark title.

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

Implementation

PdfColor get color {
  if (_isLoadedBookmark) {
    return _obtainColor();
  } else {
    return _color;
  }
}
void color=(PdfColor value)

Implementation

set color(PdfColor value) {
  if (_isLoadedBookmark) {
    _assignColor(value);
  } else {
    if (_color != value) {
      _color = value;
      _updateColor();
    }
  }
}