hkqr_fps 0.0.2 copy "hkqr_fps: ^0.0.2" to clipboard
hkqr_fps: ^0.0.2 copied to clipboard

Codec between fps information and hkqr code string.

hkqr_fps #

Encode structural FPS information to a QR code string or Decode a QR code String to structural FPS information based on the specification.

Getting Started #

Encode #

final qrString = HKQrInfo(
      isDynamic: true,
      fpsProxy: FpsProxy(FpsType.fpsId, '123456'),
      amount: '0.01',
    ).encode();

Decode #

final hkqrInfo = HKQrInfo.decode('000201010211...');

Decode tips

  • Fail-fast: Decode will fail when first error was found.
  • Warnings: Decode may success with some warnings, i.e. some unrecognized field found during decode.
  • Mandatory: Mandatory fields must present even if not used in FPS.
  • Optional: Optional fields must have valid format and length if present.

example #

There are 3 use cases in example

  • Fill form of FPS information, encode it to a QR code string, and use qr_flutter to generate a QR image;
  • Decode a QR code string to FPS information;
  • Use qr_code_scanner to scan a QR image and decode scan result to FPS information.
0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

Codec between fps information and hkqr code string.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on hkqr_fps