rect property

List<double>? get rect

Gets the rectangle (/Rect) of the field (widget annotation).

Implementation

List<double>? get rect {
  if (dictionary.containsKey(PdfNameTokens.rect)) {
    final r = dictionary[PdfNameTokens.rect];
    if (r is PdfArray && r.values.length >= 4) {
      return r.values.map((e) => (e as PdfNum).value.toDouble()).toList();
    }
  }
  return null;
}
set rect (List<double>? value)

Sets the rectangle (/Rect) of the field (widget annotation).

Implementation

set rect(List<double>? value) {
  if (value != null && value.length >= 4) {
    dictionary[PdfNameTokens.rect] = PdfArray.fromNum(value);
  } else {
    dictionary.values.remove(PdfNameTokens.rect);
  }
}