buildInfoCompany function
Widget
buildInfoCompany(
- Context context,
- DocumentOptions options,
- TextAlign textAlign
)
Implementation
pw.Widget buildInfoCompany(pw.Context context, DocumentOptions options, pw.TextAlign textAlign) {
Establishment company = options.invoice.getEstablishment();
return pw.DefaultTextStyle(
style: pw.TextStyle( color: options.textColor, fontSize: 10 ),
child: pw.Column(
mainAxisSize: pw.MainAxisSize.min,
crossAxisAlignment: textAlign == pw.TextAlign.start ? pw.CrossAxisAlignment.start
: textAlign == pw.TextAlign.end ? pw.CrossAxisAlignment.end
: pw.CrossAxisAlignment.center,
children: [
pw.Text( company.getName().toUpperCase(),
style: pw.TextStyle(fontSize: 12, fontWeight: pw.FontWeight.bold),
),
pw.SizedBox(height: 2),
if(company.getName().toUpperCase() != company.getLegalRepresentative().toUpperCase())
pw.Text(company.getLegalRepresentative().toUpperCase()),
pw.Text(company.label, textAlign: textAlign)
],
)
);
}