guide_pdf_print 1.0.1 copy "guide_pdf_print: ^1.0.1" to clipboard
guide_pdf_print: ^1.0.1 copied to clipboard

A Flutter package to generate and export medical Partograph PDF reports

example/lib/main.dart

import 'package:example/photograph_screen.dart';
import 'package:flutter/material.dart';
import 'package:guide_pdf_print/guide_pdf_print.dart' as guide;

void main() {
  runApp(const MyApp());
}

final headerJson = {
  "healthCenterName": "City Hospital",
  "patientName": "Jane Doe",
  "dobAge": "24/25",
  "phone": "9876543210",
  "idNumber": "ID123",
  "admissionDateTime": "2026-02-23 10:00",
  "onsetOfLabour": "2026-02-23 08:00",
  "activePhaseDiagnosisDate": "2026-02-23 10:00",
  "ruptureTime": "2026-02-23 09:30",
  "parity": "1",
  "gravidity": "2",
  "uterineHeight": "30",
  "abdominalCircumference": "90",
  "efw": "2500g",
  "riskFactors": "None",
};

final hoursJson = {
  "phase1": [
    "10:26",
    "11:26",
    "12:26",
    "13:26",
    "14:26",
    "15:26",
    "16:26",
    "17:26",
    "18:26",
    "19:26",
    "20:26",
    "21:26"
  ],
  "phase2": [
    "13:37",
    "14:37",
    "15:37"
  ],
  "activePhase": "Phase 2",
  "phase2Start": "2026-02-23T13:37:19.000"
};

final supportiveJson = {
    "1+h": [
      {
        "timestamp": "2026-02-23T10:26:58.000",
        "data": {
          "companion": {
            "resourceType": "Observation",
            "id": "companion1771822630383",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:26:58",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "62071000",
                  "display": "companion"
                }
              ]
            },
            "subject": {
              "reference": "Patient/914"
            },
            "encounter": {
              "reference": "Encounter/916"
            },
            "valueString": "Oui",
            "performer": [
              {
                "reference": "Practitioner/55",
                "display": "tm"
              }
            ]
          },
          "pain_relief": {
            "resourceType": "Observation",
            "id": "pain1771822630383",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:26:58",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "428346000",
                  "display": "pain_relief"
                }
              ]
            },
            "subject": {
              "reference": "Patient/914"
            },
            "encounter": {
              "reference": "Encounter/916"
            },
            "valueString": "Oui",
            "performer": [
              {
                "reference": "Practitioner/55",
                "display": "tm"
              }
            ]
          },
          "oral_fluids": {
            "resourceType": "Observation",
            "id": "oral1771822630383",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:26:58",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "74364-1",
                  "display": "oral_fluids"
                }
              ]
            },
            "subject": {
              "reference": "Patient/914"
            },
            "encounter": {
              "reference": "Encounter/916"
            },
            "valueString": "Oui",
            "performer": [
              {
                "reference": "Practitioner/55",
                "display": "tm"
              }
            ]
          },
          "nature_of_liquid": {
            "resourceType": "Observation",
            "id": "liquid1771822630383",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:26:58",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "33463005",
                  "display": "nature_of_liquid"
                }
              ]
            },
            "subject": {
              "reference": "Patient/914"
            },
            "encounter": {
              "reference": "Encounter/916"
            },
            "valueString": "test",
            "performer": [
              {
                "reference": "Practitioner/55",
                "display": "tm"
              }
            ]
          },
          "posture": {
            "resourceType": "Observation",
            "id": "posture1771822630383",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:26:58",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "363855006",
                  "display": "posture"
                }
              ]
            },
            "subject": {
              "reference": "Patient/914"
            },
            "encounter": {
              "reference": "Encounter/916"
            },
            "valueString": "En mouvement (EM)",
            "performer": [
              {
                "reference": "Practitioner/55",
                "display": "tm"
              }
            ]
          }
        }
      }
    ],
    "2+h": [],
    "3+h": [],
    "4+h": [],
    "5+h": [],
    "6+h": [],
    "7+h": [],
    "8+h": [],
    "9+h": [],
    "10+h": [],
    "11+h": [],
    "12+h": [],
    "isFullyDilated": true,
    "phase2": {
      "1+h": [],
      "2+h": [],
      "3+h": []
    },
    "phase1Hours": 12
};

final babyJson = {
    "0.30+h": [
      {
        "timestamp": "2026-02-23T10:27:14.000",
        "data": {
          "uterineHeight": {
            "resourceType": "Observation",
            "id": "uterineHeight1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "11881-0",
                  "display": "uterineHeight"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "30",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          },
          "fhr(bpm)": {
            "resourceType": "Observation",
            "id": "fhr1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "55283-6",
                  "display": "fhr(bpm)"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "110",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          },
          "fhrDeceleration": {
            "resourceType": "Observation",
            "id": "fhrDeceleration1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "20217-6",
                  "display": "fhrDeceleration"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "Non",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          },
          "fetalHead": {
            "resourceType": "Observation",
            "id": "fetalHead1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "11986-7",
                  "display": "fetalHead"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "1/5",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          },
          "abdominalCircumference": {
            "resourceType": "Observation",
            "id": "abdominalCir1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "11884-4",
                  "display": "abdominalCircumference"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "90",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          },
          "estimatedFetalWeight": {
            "resourceType": "Observation",
            "id": "estimatedFetal1771822700096",
            "status": "final",
            "effectiveDateTime": "2026-02-23T10:27:14",
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "11881-0",
                  "display": "estimatedFetalWeight"
                }
              ]
            },
            "subject": { "reference": "Patient/914" },
            "encounter": { "reference": "Encounter/916" },
            "valueString": "2295 - 3105",
            "performer": [
              { "reference": "Practitioner/55", "display": "tm" }
            ]
          }
        }
      }
    ],
    "1+h": [],
    "1.30+h": [],
    "2+h": [],
    "2.30+h": [],
    "3+h": [],
    "3.30+h": [],
    "4+h": [],
    "4.30+h": [],
    "5+h": [],
    "5.30+h": [],
    "6+h": [],
    "6.30+h": [],
    "7+h": [],
    "7.30+h": [],
    "8+h": [],
    "8.30+h": [],
    "9+h": [],
    "9.30+h": [],
    "10+h": [],
    "10.30+h": [],
    "11+h": [],
    "11.30+h": [],
    "12+h": [],
    "isFullyDilated": true,
    "phase2": {
      "0.15+h": [],
      "0.30+h": [],
      "0.45+h": [],
      "1+h": [],
      "1.15+h": [],
      "1.30+h": [],
      "1.45+h": [],
      "2+h": [],
      "2.15+h": [],
      "2.30+h": [],
      "2.45+h": [],
      "3+h": []
    },
    "phase1Hours": 12
};

final data2h = {
  "2+h": [
    {
      "timestamp": "2026-02-23T10:29:56.000",
      "data": {
        "carePlan": {
          "resourceType": "Observation",
          "id": "carePlan1771822807848",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:56",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "734163000",
                "display": "carePlan"
              }
            ]
          },
          "subject": {
            "reference": "Patient/914"
          },
          "encounter": {
            "reference": "Encounter/916"
          },
          "valueString": "Soins du périnée",
          "performer": [
            {
              "reference": "Practitioner/55",
              "display": "tm"
            }
          ]
        },
        "evaluation": {
          "resourceType": "Observation",
          "id": "evaluation1771822807848",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:56",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "385958001",
                "display": "evaluation"
              }
            ]
          },
          "subject": {
            "reference": "Patient/914"
          },
          "encounter": {
            "reference": "Encounter/916"
          },
          "valueString": "test",
          "performer": [
            {
              "reference": "Practitioner/55",
              "display": "tm"
            }
          ]
        }
      }
    }
  ],
  "4+h": [],
  "6+h": [],
  "8+h": [],
  "10+h": [],
  "12+h": [],
  "isFullyDilated": true,
  "phase2": {
    "1+h": [],
    "2+h": [],
    "3+h": []
  }
};

final datanew = {
  "1+h": [
    {
      "timestamp": "2026-02-23T10:29:56.000",
      "data": {
        "carePlan": {
          "resourceType": "Observation",
          "id": "carePlan1771822807848",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:56",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "734163000",
                "display": "carePlan"
              }
            ]
          },
          "subject": {
            "reference": "Patient/914"
          },
          "encounter": {
            "reference": "Encounter/916"
          },
          "valueString": "Soins du périnée",
          "performer": [
            {
              "reference": "Practitioner/55",
              "display": "tm"
            }
          ]
        },
        "evaluation": {
          "resourceType": "Observation",
          "id": "evaluation1771822807848",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:56",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "385958001",
                "display": "evaluation"
              }
            ]
          },
          "subject": {
            "reference": "Patient/914"
          },
          "encounter": {
            "reference": "Encounter/916"
          },
          "valueString": "test",
          "performer": [
            {
              "reference": "Practitioner/55",
              "display": "tm"
            }
          ]
        }
      }
    }
  ],
  "2+h": [],
  "3+h": [],
  "4+h": [],
  "5+h": [],
  "6+h": [],
  "7+h": [],
  "8+h": [],
  "9+h": [],
  "10+h": [],
  "11+h": [],
  "12+h": [],
  "isFullyDilated": true,
  "phase2": {
    "1+h": [],
    "2+h": [],
    "3+h": []
  },
  "phase1Hours": 12
};

final medData = {
  "1+h": [
    {
      "timestamp": "2026-02-23T10:29:24.000",
      "data": {
        "oxytocinAdministered": {
          "resourceType": "Observation",
          "id": "oxytocinAdministered1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "112115002",
                "display": "oxytocinAdministered"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "Oui",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "amtOfOxytocin": {
          "resourceType": "Observation",
          "id": "amtOfOxytocin1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "74364-1",
                "display": "amtOfOxytocin"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "5UI dans 500ml de soluté",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "timeOfOxy": {
          "resourceType": "Observation",
          "id": "timeOfOxy1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "valueString": "10:29 AM"
        },
        "oxyAdministrationRate": {
          "resourceType": "Observation",
          "id": "oxyAdministrationRate1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "valueString": "30"
        },
        "medicationToPreeclampsia": {
          "resourceType": "Observation",
          "id": "medicationToPreeclampsia1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "valueString": "Non"
        },
        "otherMedication": {
          "resourceType": "Observation",
          "id": "otherMedication1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "valueString": "Non"
        },
        "ivFuildWithOxy": {
          "resourceType": "Observation",
          "id": "ivFuildWithOxy1771822792254",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:29:24",
          "valueString": "Non"
        }
      }
    }
  ],

  "2+h": [],
  "3+h": [],
  "4+h": [],
  "5+h": [],
  "6+h": [],
  "7+h": [],
  "8+h": [],
  "9+h": [],
  "10+h": [],
  "11+h": [],
  "12+h": [],

  "isFullyDilated": true,

  "phase2": {
    "1+h": [
      {
        "timestamp": "2026-02-23T13:39:07.000",
        "data": {
          "oxytocinAdministered": {
            "resourceType": "Observation",
            "id": "oxytocinAdministered1771834173413",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "Oui"
          },
          "amtOfOxytocin": {
            "resourceType": "Observation",
            "id": "amtOfOxytocin1771834173413",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "10UI dans 1litre de soluté"
          },
          "timeOfOxy": {
            "resourceType": "Observation",
            "id": "timeOfOxy1771834173413",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "01:39 PM"
          },
          "oxyAdministrationRate": {
            "resourceType": "Observation",
            "id": "oxyAdministrationRate1771834173413",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "30"
          },
          "waterBagRuptured": {
            "resourceType": "Observation",
            "id": "waterBagRuptured1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "Non"
          },
          "medicationToPreeclampsia": {
            "resourceType": "Observation",
            "id": "medicationToPreeclampsia1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "Non"
          },
          "otherMedication": {
            "resourceType": "Observation",
            "id": "otherMedication1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "Non"
          },
          "ivFuildWithOxy": {
            "resourceType": "Observation",
            "id": "ivFuildWithOxy1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "Oui"
          },
          "nameOfIv": {
            "resourceType": "Observation",
            "id": "nameOfIv1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "test"
          },
          "flowRateIv": {
            "resourceType": "Observation",
            "id": "flowRateIv1771834173414",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:39:07",
            "valueString": "30"
          }
        }
      }
    ],
    "2+h": [],
    "3+h": []
  },

  "phase1Hours": 12
};

final laborData = {
  "0.30+h": [
    {
      "timestamp": "2026-02-23T10:28:55.000",
      "data": {
        "uterineContraction": {
          "resourceType": "Observation",
          "id": "uterineContraction1771822760001",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:28:55",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "70514001",
                "display": "uterineContraction"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "5",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "durationOfUterine": {
          "resourceType": "Observation",
          "id": "durationOfUterine1771822760002",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:28:55",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "70514001",
                "display": "durationOfUterine"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "30",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "vaginalBleeding": {
          "resourceType": "Observation",
          "id": "vaginalBleeding1771822760002",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:28:55",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "289530006",
                "display": "vaginalBleeding"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "Non",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "dilation": {
          "resourceType": "Observation",
          "id": "dilation1771822760002",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:28:55",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "11787-9",
                "display": "dilation"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "8",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        },
        "membranes": {
          "resourceType": "Observation",
          "id": "membranes1771822760002",
          "status": "final",
          "effectiveDateTime": "2026-02-23T10:28:55",
          "code": {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "249125003",
                "display": "membranes"
              }
            ]
          },
          "subject": { "reference": "Patient/914" },
          "encounter": { "reference": "Encounter/916" },
          "valueString": "Membranes Intactes",
          "performer": [
            { "reference": "Practitioner/55", "display": "tm" }
          ]
        }
      }
    }
  ],
  "1+h": [],
  "1.30+h": [],
  "2+h": [],
  "2.30+h": [],
  "3+h": [],
  "3.30+h": [],
  "4+h": [],
  "4.30+h": [],
  "5+h": [],
  "5.30+h": [],
  "6+h": [],
  "6.30+h": [],
  "7+h": [],
  "7.30+h": [],
  "8+h": [],
  "8.30+h": [],
  "9+h": [],
  "9.30+h": [],
  "10+h": [],
  "10.30+h": [],
  "11+h": [],
  "11.30+h": [],
  "12+h": [],
  "isFullyDilated": true,
  "phase2": {
    "0.15+h": [
      {
        "timestamp": "2026-02-23T13:37:19.000",
        "data": {
          "dilation": {
            "resourceType": "Observation",
            "id": "dilation1771834074628",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:37:19",
            "valueString": "10"
          },
          "vaginalBleeding": {
            "resourceType": "Observation",
            "id": "vaginalBleeding1771834074628",
            "status": "final",
            "effectiveDateTime": "2026-02-23T13:37:19",
            "valueString": "Trace"
          }
        }
      }
    ],
    "0.30+h": [],
    "0.45+h": [],
    "1+h": [],
    "1.15+h": [],
    "1.30+h": [],
    "1.45+h": [],
    "2+h": [],
    "2.15+h": [],
    "2.30+h": [],
    "2.45+h": [],
    "3+h": []
  },
  "phase1Hours": 12
};

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {

    final parser = guide.PartographParserService();

    final gridJsonList = [
      supportiveJson,
      babyJson,
      data2h,
      datanew,
      medData,
      laborData,
    ];

    final partographData = parser.parse(
      headerJson: headerJson,
      hoursJson: hoursJson,
      gridJsonList: gridJsonList,
      phase1DurationHours: 12,
    );

    print(partographData.grid.supportiveCare.companion.phase1Values);
    print(partographData.grid.baby.baselineFhr.phase1Values);

    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // TRY THIS: Try running your application with "flutter run". You'll see
        // the application has a purple toolbar. Then, without quitting the app,
        // try changing the seedColor in the colorScheme below to Colors.green
        // and then invoke "hot reload" (save your changes or press the "hot
        // reload" button in a Flutter-supported IDE, or press "r" if you used
        // the command line to start the app).
        //
        // Notice that the counter didn't reset back to zero; the application
        // state is not lost during the reload. To reset the state, use hot
        // restart instead.
        //
        // This works for code too, not just values: Most code changes can be
        // tested with just a hot reload.
        colorScheme: .fromSeed(seedColor: Colors.deepPurple),
      ),
      home: PartographScreen(
        phase1Hours: 12,
        titles: guide.PartographTitles(
            appBarTitle: "Partograph",
            healthCenterName: "Health Center Name",
            patientName: "Patient Name",
            dobAge: "DOB/Age",
            phone: "Phone",
            idNumber: "ID Number",
            admissionDateTime: "Admission DateTime",
            onsetOfLabour: "Onset of Labour",
            activePhaseDiagnosisDate: "Active Phase Diagnosis Date",
            ruptureTime: "Rupture Time",
            parity: "Parity",
            gravidity: "Gravidity",
            uterineHeight: "Uterine Height",
            abdominalCircumference: "Abdominal Circumference",
            efw: "EFW",
            riskFactors: "Risk Factors",
            hoursMin: "Hours/min",
            numberOfHours: "No. of Hours",
            secondStage: "Second Stage",
            supportiveCare: "Supportive Care",
            baby: "Baby",
            women: "Women",
            labourProgress: "Labour Progress",
            medication: "Medication",
            sharedDecision: "Shared Decision",
            companion: "Companion",
            painRelief: "Pain relief",
            oralFluid: "Oral fluid",
            posture: "Posture",
            baselineFhr: "Baseline FHR",
            fhrDeceleration: "FHR deceleration",
            amnioticFluid: "Amniotic fluid",
            fetalPosition: "Fetal position",
            caput: "Caput",
            moulding: "Moulding",
            pulse: "Pulse",
            systolicBp: "Systolic BP",
            diastolicBp: "Diastolic BP",
            temperature: "Temperature °C",
            urine: "Urine",
            contractions: "Contractions",
            duration: "Duration",
            oxytocin: "Oxytocin (U/L, drops/min)",
            medicine: "Medicine",
            ivFluid: "IV fluid",
            assessment: "Assessment",
            plan: "Plan",
            generatedOn: "Generated on"
        ),
        data: partographData
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // TRY THIS: Try changing the color here to a specific color (to
        // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
        // change color while the other colors stay the same.
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          //
          // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
          // action in the IDE, or press "p" in the console), to see the
          // wireframe for each widget.
          mainAxisAlignment: .center,
          children: [
            const Text('You have pushed the button this many times:'),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
0
likes
0
points
570
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to generate and export medical Partograph PDF reports

License

unknown (license)

Dependencies

flutter, pdf, printing

More

Packages that depend on guide_pdf_print