buildInfoPayment function
Implementation
pw.Widget buildInfoPayment(pw.Context context, DocumentOptions options) {
String paymentFormId = options.invoice.paymentFormId;
String paymentMethodId = options.invoice.paymentMethodId;
PaymentForm paymentForm = PaymentForm.fromId(paymentFormId);
Map paymentMethod = dataPaymentMethods[paymentMethodId] ?? {};
double widthLabel = 90;
return pw.Container(
//padding: const pw.EdgeInsets.all(16),
//color: PdfColors.blueGrey50,
child: pw.DefaultTextStyle(
style: pw.TextStyle( color: options.textColor, fontSize: 9 ),
child: pw.Column(
crossAxisAlignment: pw.CrossAxisAlignment.start,
children: [
pw.Row(
children: [
pw.SizedBox(width: widthLabel, child: pw.Text('Forma de pago:', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
pw.Text(paymentForm.getName()),
]
),
pw.Row(
children: [
pw.SizedBox(width: widthLabel, child: pw.Text('Medio de pago', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
pw.Text(paymentMethod['name'] ?? ''),
]
),
],
),
),
);
}