thai_promptpay_flutter 0.4.0 copy "thai_promptpay_flutter: ^0.4.0" to clipboard
thai_promptpay_flutter: ^0.4.0 copied to clipboard

Flutter widgets that render a Thai PromptPay (EMVCo) QR code from a mobile number, National ID / Tax ID, e-Wallet or Bill Payment, with an optional amount.

Changelog #

0.4.0 #

  • Add a decode side to the package (closes #1):
    • decodeThaiQr(String) → sealed ThaiQrResult (PromptPayResult | BillPaymentResult | SlipResult) — one call that recognizes a personal PromptPay, a Bill Payment, or a Slip Verify Mini-QR. Never throws; returns null if unrecognized.
    • ThaiQrResultCard (+ ThaiQrResultCard.fromPayload) — a Material widget that renders a decoded result (recipient/biller/bank, baht text, refs).
    • PromptPayScanner — a camera scanner widget (via mobile_scanner) that reports a ThaiQrResult through onResult; plus decodeThaiQrFromImage.
  • Bump thai_promptpay to ^0.3.0 (adds Slip Verify decoding).
  • Requires Flutter >= 3.29 / Dart >= 3.7 now (a floor raised by mobile_scanner 7.x). Camera use needs platform setup — see the README.

0.3.4 #

  • Docs: add a live web demo (the example gallery deployed to GitHub Pages) and a workflow to keep it updated. The gallery now builds for web (thanks to the thainum ^0.5.3 dart2js fix). No library changes.

0.3.3 #

  • Docs: clarify the Thai tagline wording (สร้าง QR; เลขที่ผู้เสียภาษี). No code changes.

0.3.2 #

  • Gallery example. The example is now a runnable gallery (mobile / desktop / web) touring every widget — bare QR, QR card, live amount field, Bill Payment QR + card — plus an interactive playground (pick a type, enter the number/biller + amount → live QR + copyable payload) and a decode demo (paste any payload → see who / how much via decodeAny). TH/EN toggle. No library changes.

0.3.1 #

  • Responsive cards (overflow fix). PromptPayQrCard and PromptPayBillQrCard no longer throw a RenderFlex overflowed on small or narrow surfaces: the embedded QR is clamped to the available width and the content scrolls vertically when space is tight (via a shared internal ResponsiveCardBody). In normal/roomy layouts the cards shrink-wrap and look exactly as before. No public API change.

0.3.0 #

  • PromptPayBillQr — renders a PromptPay Bill Payment (EMVCo tag 30) QR from a Biller ID + Ref1 (optional Ref2 + amount). Mirrors PromptPayQr: invalid input shows an errorBuilder (or a default placeholder) instead of throwing, and a payload getter exposes the exact EMVCo string it renders.
  • PromptPayBillQrCard — a drop-in Material card: the bill QR + a title, the Biller ID / Ref1 / Ref2 rows, and the amount as Thai baht text (via thainum).
  • Requires thai_promptpay ^0.2.0 (the bill-payment codec). The new codec API (encodeBillPayment, decodeBillPayment, decodeAny, BillPaymentPayload) is re-exported.

0.2.0 #

  • PromptPayAmountField — a text field for entering a Thai baht amount, reporting the value as integer satang via onChanged (null when empty). Restricts input to digits + at most two decimals, shows a ฿ prefix, and owns/disposes its controller safely. Wire it to a PromptPayQr for a live "enter an amount" payment screen.
  • BahtAmountInputFormatter + satangFromBahtString / bahtStringFromSatang — the exact (no double) baht↔satang helpers behind the field, exported for reuse.

0.1.0 #

Initial release. Flutter widgets for Thai PromptPay (EMVCo) QR codes, built on the pure-Dart thai_promptpay codec

  • qr_flutter (and thainum for baht text). Re-exports the codec.
  • PromptPayQr — renders the QR for a mobile number / National ID / e-Wallet, with an optional amount (integer satang). Convenience constructors PromptPayQr.mobile/.nationalId/.eWallet. Invalid input shows an errorBuilder (or a default placeholder) instead of throwing. A payload getter exposes the exact EMVCo string the widget renders (for share/copy).
  • PromptPayQrCard — a drop-in Material card: the QR + a title, the recipient, and the amount shown as Thai baht text (via thainum).
0
likes
160
points
250
downloads

Documentation

API reference

Publisher

verified publisher10v3n4m.cc

Weekly Downloads

Flutter widgets that render a Thai PromptPay (EMVCo) QR code from a mobile number, National ID / Tax ID, e-Wallet or Bill Payment, with an optional amount.

Repository (GitHub)
View/report issues

Topics

#promptpay #thai #qr #payment #flutter

License

MIT (license)

Dependencies

flutter, mobile_scanner, qr_flutter, thai_promptpay, thainum

More

Packages that depend on thai_promptpay_flutter