user_info method

Container user_info(
  1. dynamic title
)

Implementation

pw.Container user_info(title) {
  return pw.Container(
      width: double.infinity,
      height: 100,
      color: PdfColors.white,
      margin: const pw.EdgeInsets.only(top: 10),
      child: pw.Row(
          mainAxisAlignment: pw.MainAxisAlignment.start,
          crossAxisAlignment: pw.CrossAxisAlignment.start,
          children: [
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 0; i < 4; i++)
                    pw.Container(
                        alignment: pw.Alignment.topLeft,
                        height: 25,
                        child: pw.Text("${title[i].field}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
            pw.SizedBox(width: 30),
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 0; i < 4; i++)
                    pw.Container(
                        height: 25,
                        child: pw.Text("${title[i].value}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
            pw.SizedBox(width: 35),
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 4; i < 8; i++)
                    pw.Container(
                        height: 25,
                        child: pw.Text("${title[i].field}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
            pw.SizedBox(width: 30),
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 4; i < 8; i++)
                    pw.Container(
                        height: 25,
                        child: pw.Text("${title[i].value}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
            pw.SizedBox(width: 35),
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 8; i < 12; i++)
                    pw.Container(
                        height: 25,
                        child: pw.Text("${title[i].field}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
            pw.SizedBox(width: 30),
            pw.Column(
                mainAxisAlignment: pw.MainAxisAlignment.start,
                crossAxisAlignment: pw.CrossAxisAlignment.start,
                children: [
                  for (int i = 8; i < 12; i++)
                    pw.Container(
                        height: 25,
                        child: pw.Text("${title[i].value}",
                            style: const pw.TextStyle(fontSize: 12))),
                ]),
          ]));
}