passkit 0.0.12 passkit: ^0.0.12 copied to clipboard
Pure Dart library which can create and read Apple's PkPass files (which are usually shown in Apple Wallet). Works on servers and in apps.
import 'dart:io';
import 'package:passkit/passkit.dart';
void main() async {
final passKitBytes = await File('pass.pkpass').readAsBytes();
final pkPass = PkPass.fromBytes(
passKitBytes,
skipChecksumVerification: true,
skipSignatureVerification: true,
);
print(pkPass.pass.description);
if (pkPass.isWebServiceAvailable) {
final updatedPass = PassKitWebClient().getLatestVersion(pkPass);
print(updatedPass);
}
}