upi_link 0.1.2
upi_link: ^0.1.2 copied to clipboard
Build and parse UPI payment links (upi://pay) in pure Dart, with validation and exact amounts.
0.1.2 #
UpiLink.parsenow reads real-world QR codes. Keys outside the supported fields (mode,purpose,orgid,sign, app-specific keys) are kept in the newextraParametersmap instead of causing aFormatException.- Add
UpiLink.extraParametersand an optionalextraParametersconstructor argument.toString()writes them after the supported fields. parsetreats empty supported values (am=) as absent, matches supported keys andcu=INRcase-insensitively, ignores empty segments and a trailing/afterpay, trims whitespace, and reads HTML-escaped&.- A supported key repeated with the same value is accepted; different values still throw.
- An unencoded
&inside a value (pn=A&B%20Traders) is read as part of the value instead of failing the link. - Add
tool/simulate.dart, a parser simulation (round trip, real-world variants, fuzz), and record known limitations indoc/parser-simulation.md.
0.1.1 #
- Add CI badge to the README. No API changes.
- First release published automatically from GitHub Actions.
0.1.0 #
- Initial release.
UpiLinkbuildsupi://paylinks from 8 NPCI parameters:pa,pn,am,tn,tr,mc,tid,url.UpiLink.parseandUpiLink.tryParseread links back, strictly.UpiLinkExceptionnames the field that failed validation.