This package strictly follows the guidelines provided by the Zatca authority to generate a simplified e-invoice (fatoora) QR code to print into the Bill/invoice of your business.
For more info kindly visit the official Zatca Docs.
For full example of the code, kindly have a look here /example folder.
ZatcaFatoora.simpleQRCode(
fatooraData: ZatcaFatooraDataModel(
businessName: "Business name",
vatRegistrationNumber: "323456789123453",
date: DateTime.now(),
totalAmountIncludingVat: 50.75,
),
)
ZatcaFatoora.styledQRCode(
fatooraData: ZatcaFatooraDataModel(
businessName: "Business name",
vatRegistrationNumber: "323456789123453",
date: DateTime.now(),
totalAmountIncludingVat: 50.85,
),
// Provide your own style to the QR code data
qrStyleData: QRStyleData(
image: const AssetImage("assets/images/logo.jpeg"),
size: 200,
backgroundColor: Colors.green.withOpacity(.1),
qrColor: Colors.green,
isBorderShapeRounded: true,
),
)
ZatcaFatoora.customQRCode(
fatooraData: ZatcaFatooraDataModel(
businessName: "Business name",
vatRegistrationNumber: "323456789123453",
date: DateTime.now(),
totalAmountIncludingVat: 50.75,
),
builder: (BuildContext context, String qrData, Widget qrCode) {
// debugPrint("QR Code data: $qrData");
return Container(
padding: const EdgeInsets.all(30),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.grey.shade200,
border: Border.all(color: Colors.grey.shade300),
),
child: qrCode,
);
},
)