PdfListItemCollection class

Represents collection of list items.

//Create a new PDF document.
PdfDocument document = PdfDocument();
//Create a new ordered list.
PdfOrderedList(
    //Create a new list item collection.
    items: PdfListItemCollection(['PDF', 'XlsIO', 'DocIO', 'PPT']),
    font: PdfStandardFont(PdfFontFamily.helvetica, 16,
        style: PdfFontStyle.italic),
    format: PdfStringFormat(lineSpacing: 20),
    marker: PdfOrderedMarker(style: PdfNumberStyle.numeric),
    style: PdfNumberStyle.numeric,
    indent: 15,
    textIndent: 10)
  ..draw(page: document.pages.add(), bounds: Rect.fromLTWH(20, 20, 0, 0));
//Save the document.
List<int> bytes = await document.save();
//Dispose the document.
document.dispose();
Inheritance

Constructors

PdfListItemCollection([List<String>? items])
Initializes a new instance of the PdfListItemCollection class.

Properties

count int
Gets number of the elements in the collection.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(PdfListItem item, [double? itemIndent]) int
Adds the specified item.
clear() → void
Clears collection
indexOf(PdfListItem item) int
Determines the index of a specific item in the list.
insert(int index, PdfListItem item, [double? itemIndent]) → void
Inserts item at the specified index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(PdfListItem item) → void
Removes the specified item from the list.
removeAt(int index) → void
Removes the item at the specified index from the list.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) PdfListItem
Gets the PdfListItem from collection at the specified index.