PdfBox.fromList constructor

PdfBox.fromList(
  1. List<num> values
)

Creates the box from a list of four numbers.

Throws ArgumentError when the list does not hold exactly four finite values. For input coming from a file, prefer tryFromList.

Implementation

factory PdfBox.fromList(List<num> values) {
  final box = tryFromList(values);
  if (box == null) {
    throw ArgumentError.value(
        values, 'values', 'Uma caixa PDF exige quatro nĂºmeros finitos.');
  }
  return box;
}