PdfRectangleAnnotation constructor
PdfRectangleAnnotation(})
Initializes new instance of the PdfRectangleAnnotation with bounds, text, border, color, innerColor, author, rotate, subject, modifiedDate, and flags.
PdfDocument document = PdfDocument();
PdfPage page = document.pages.add();
PdfRectangleAnnotation rectangleAnnotation = PdfRectangleAnnotation(
const Rect.fromLTWH(0, 30, 80, 80), 'SquareAnnotation',
innerColor: PdfColor(255, 0, 0), color: PdfColor(255, 255, 0));
page.annotations.add(rectangleAnnotation);
List<int> bytes = await document.save();
document.dispose();
Implementation
PdfRectangleAnnotation(Rect bounds, String text,
{PdfColor? color,
PdfColor? innerColor,
PdfAnnotationBorder? border,
String? author,
String? subject,
double? opacity,
DateTime? modifiedDate,
List<PdfAnnotationFlags>? flags,
bool? setAppearance}) {
_helper = PdfRectangleAnnotationHelper(this, bounds, text,
color: color,
innerColor: innerColor,
border: border,
author: author,
subject: subject,
modifiedDate: modifiedDate,
opacity: opacity,
flags: flags,
setAppearance: setAppearance);
}