paint method
Draw itself and its children, according to the calculated
box.offset
Implementation
@override
void paint(pw.Context context) {
super.paint(context);
final style = pw.Theme.of(context).defaultTextStyle.merge(textStyle);
final pdfRect = context.localToGlobal(box!);
final field = PdfChoiceField(
textColor: style.color!,
fieldName: name,
value: value,
font: style.font!.getFont(context),
fontSize: style.fontSize!,
items: items,
rect: pdfRect,
);
if (value != null) {
drawAppearance(
context,
field,
getAppearanceMatrix(context),
BanglaAwareText(value!, style: style),
tag: const PdfName('/Tx'),
);
}
PdfAnnot(
context.page,
field,
objser: replaces?.ser,
objgen: replaces?.gen ?? 0,
);
}