textStyle property

List<PdfTextStyle> get textStyle

Gets or sets the style of the outline 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

List<PdfTextStyle> get textStyle {
  if (_isLoadedBookmark) {
    return <PdfTextStyle>[_obtainTextStyle()];
  } else {
    return _textStyle;
  }
}
set textStyle (List<PdfTextStyle> value)

Implementation

set textStyle(List<PdfTextStyle> value) {
  if (_isLoadedBookmark) {
    _assignTextStyle(value);
  } else {
    if (_textStyle != value) {
      _textStyle = value;
      _updateTextStyle();
    }
  }
}