A comprehensive Flutter plugin for creating and managing wallet cards on both iOS (Apple Wallet) and Android (Google Wallet). This plugin provides a unified API for generating, adding, and managing wallet passes across platforms.
Features
Cross-Platform Support
iOS: Full Apple Wallet (Passkit) integration
Android: Google Wallet integration
Unified API: Single codebase for both platforms
Card Operations
✅ Check wallet availability
✅ Add cards to wallet
✅ Check if card is already added
✅ View cards in wallet
✅ Generate card files from data
✅ Parse existing card files
✅ Download cards from URLs
Card Types Supported
Generic Cards: General purpose cards
Boarding Passes: Flight tickets
Coupons: Discount and promotional cards
Event Tickets: Concert, sports, and event passes
Store Cards: Loyalty and membership cards
Advanced Features
🎨 Custom colors and styling
📍 Location-based relevance
📅 Date-based relevance
🔒 Secure certificate signing (iOS)
🌐 Network download support
🧪 Comprehensive test coverage
Installation
Add this to your package's pubspec.yaml file:
dependencies:flutter_wallet_card:^5.0.0
Then run:
flutter pub get
Platform Setup
iOS Setup
Enable Wallet capability in your iOS project:
Open ios/Runner.xcworkspace in Xcode
Select your target → Signing & Capabilities
Add "Wallet" capability
Configure your Apple Developer account:
Create a Pass Type ID in Apple Developer Console
Generate certificates for pass signing
Android Setup
Add Google Wallet API to your project:
Enable Google Wallet API in Google Cloud Console
Configure OAuth 2.0 credentials
Ensure your app uses play-services-pay (automatically included by the plugin):
// Generate a card file for sharing or storageFile cardFile = awaitFlutterWalletCard.generateCardFile(card);
print('Card file created at: ${cardFile.path}');
Adding Cards from URLs
// Download and add a card from a URLtry {
bool success = awaitFlutterWalletCard.addFromUrl(
'https://example.com/mycard.pkpass',
);
print('Card added: $success');
} catch (e) {
print('Failed to add card from URL: $e');
}
Parsing Existing Card Files
// Parse a wallet card from a local fileWalletCard card = awaitFlutterWalletCard.parseFromFile(File('/path/to/card.pkpass'));
print('Card title: ${card.metadata.title}');
Platform-Specific Features
// iOS: Add multiple cards at onceif (Platform.isIOS) {
List<WalletCard> cards = [card1, card2, card3];
bool success = awaitFlutterWalletCard.addMultipleToWallet(cards);
}
// Android: Save pass with JWTif (Platform.isAndroid) {
String jwt = 'your-google-wallet-jwt';
bool success = awaitFlutterWalletCard.savePassWithJwt(jwt);
// Create a pass linkString link = awaitFlutterWalletCard.createPassLink({
'objectId': 'your-object-id',
});
}