paint method
Draw itself and its children, according to the calculated
box.offset
Implementation
@override
void paint(Context context) {
super.paint(context);
final bf = PdfButtonField(
rect: context.localToGlobal(box!),
fieldName: name,
flags: flags,
fieldFlags: <PdfFieldFlags>{PdfFieldFlags.pushButton},
);
final mat = getAppearanceMatrix(context);
drawAppearance(context, bf, mat, child!);
drawAppearance(context, bf, mat, _childDown, type: PdfAnnotAppearance.down);
drawAppearance(context, bf, mat, _childRollover,
type: PdfAnnotAppearance.rollover);
PdfAnnot(
context.page,
bf,
objser: replaces?.ser,
objgen: replaces?.gen ?? 0,
);
}