graphtitle method

Stack graphtitle(
  1. String title,
  2. PdfColor baseColor
)

Implementation

pw.Stack graphtitle(String title, PdfColor baseColor) {
  return pw.Stack(children: [
    pw.Divider(color: baseColor, thickness: 1.5),
    pw.Align(
      alignment: pw.Alignment.topLeft,
      child: pw.Container(
        width: 120,
        height: 20,
        margin: const pw.EdgeInsets.only(top: 8),
        padding: const pw.EdgeInsets.all(3),
        color: Constant.titlebackground,
        child: pw.Text(
          "$title",
          textAlign: (pw.TextAlign.center),
          style: pw.TextStyle(
              fontSize: 10,
              fontWeight: pw.FontWeight.bold,
              color: PdfColors.white),
        ),
      ),
    ),
  ]);
}