platform_wallet 1.0.2 copy "platform_wallet: ^1.0.2" to clipboard
platform_wallet: ^1.0.2 copied to clipboard

Save your wallet passes on both iOS & Android quickly and easily

platform_wallet #

Save your wallet passes on both iOS & Android.

Why this plugin ? #

The plugin add_to_wallet, used to save passes on iOS, blocks builds on Android. Since I needed to build on both platforms, I made this simple plugin to allow both platforms to use passes and allow builds.

Installation #

Install this plugin by running

flutter pub add platform_wallet

Usage #

You can check if the Wallet API is available on the device :

PlatformWallet.instance.isWalletApiAvailable();

iOS #

final Uri uri = Uri.parse("https://example.com/pass.pkpass");
try {
	final PKPass pass = await PKPass.fromUrl(
		uri,
		headers: {"Authorization": "Bearer ..."},
	);
	pass.save();
} on PlatformWalletException catch (e) {
	print("Something went wrong...");
	print(e);
}

Android #

final Uri uri = Uri.parse("https://pay.google.com/gp/v/save/ey...");  
try {
	final GooglePass pass = GooglePass.fromUrl(uri);
	pass.save();
} on PlatformWalletException catch (e) {
	print("Something went wrong...");
	print(e);
}
1
likes
160
points
312
downloads

Publisher

verified publisherdoggo-saloon.net

Weekly Downloads

Save your wallet passes on both iOS & Android quickly and easily

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on platform_wallet