buildInfoInvoice function

Widget buildInfoInvoice(
  1. Context context,
  2. DocumentOptions options
)

Implementation

pw.Widget buildInfoInvoice(pw.Context context, DocumentOptions options) {
  Invoice invoice = options.invoice;
  String paymentFormId = options.invoice.paymentFormId;
  String paymentMethodId = options.invoice.paymentMethodId;
  PaymentForm paymentForm = PaymentForm.fromId(paymentFormId);
  Map paymentMethod = dataPaymentMethods[paymentMethodId] ?? {};
  double widthLabel = 100;
  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('No', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
              pw.Text(invoice.getNumber(), style: pw.TextStyle( color: options.primaryColor, fontWeight: pw.FontWeight.bold )),
            ]
          ),
          pw.Row(
            children: [
              pw.SizedBox(width: widthLabel, child: pw.Text('Fecha', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
              pw.Text(invoice.getDate()),
            ]
          ),
          pw.Row(
            children: [
              pw.SizedBox(width: widthLabel, child: pw.Text('Fecha validación Dian', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
              pw.Text(invoice.getDate()),
            ]
          ),
          pw.Row(
            children: [
              pw.SizedBox(width: widthLabel, child: pw.Text('Hora validación Dian', style: pw.TextStyle(fontWeight: pw.FontWeight.bold) )),
              pw.Text(invoice.getDate()),
            ]
          ),
        ],
      ),
    ),
  );
}