build method
void
build(
- PdfPage page,
- PdfObject<PdfDataType> object,
- PdfDict<PdfDataType> params
)
override
Implementation
@override
void build(PdfPage page, PdfObject object, PdfDict params) {
super.build(page, object, params);
if (maxLength != null) {
params['/MaxLen'] = PdfNum(maxLength!);
}
final buf = PdfStream();
final g = PdfGraphics(page, buf);
g.setFillColor(textColor);
g.setFont(font, fontSize);
params['/DA'] = PdfString.fromStream(buf);
if (value != null) {
params['/V'] = PdfString.fromString(value!);
}
if (defaultValue != null) {
params['/DV'] = PdfString.fromString(defaultValue!);
}
if (textAlign != null) {
params['/Q'] = PdfNum(textAlign!.index);
}
}