ZATCA invoices in a Flutter app
The matheel_zatca package on pub.dev: a bilingual invoice card with the ZATCA QR drawn natively, the totals and VAT, and a button that opens the PDF.

1. Your server files the invoice
After a successful payment your server calls Matheel with the ready function (PHP, Laravel, Node.js, Python and more) and keeps qr and pdf with the order.
2. The app shows it
// flutter pub add matheel_zatca url_launcher
import 'package:matheel_zatca/matheel_zatca.dart';
import 'package:url_launcher/url_launcher.dart';
// invoice = what YOUR server returned after filing with Matheel: {"qr": "...", "pdf_url": "..."}
ZatcaInvoiceCard(
qr: invoice['qr'],
onOpenPdf: () => launchUrl(Uri.parse(invoice['pdf_url'])),
)
// Or just the fields: ZatcaQrData.decode(invoice['qr']).total
ZatcaInvoiceCard: the whole card;arabic: falsefor English.ZatcaQrImage: the QR alone.ZatcaQrData.decode: the TLV fields (seller, VAT number, time, total, VAT, hash, signature, key).
FAQ
Does the app call Matheel directly?
No. Your Matheel key stays on your server: the server files the invoice after payment, and the app gets qr and the PDF URL from it and shows them with the package.
Can ZATCA's app read the QR?
Yes. The package draws the exact TLV text Matheel returns, the same one inside the invoice, so any reader can verify it.
Can I use only the QR, without the card?
Yes: ZatcaQrImage draws the code alone, and ZatcaQrData.decode returns the seller, VAT number, time, total and VAT.