operator [] method Null safety

PdfLayer operator [](
  1. int index
)

Gets PdfLayer by its index from PdfLayerCollection.

Implementation

PdfLayer operator [](int index) {
  if (index < 0 || index >= count) {
    throw RangeError('index');
  }
  return _list[index] as PdfLayer;
}