{"id":29634961,"url":"https://github.com/webeferen/flutter_wallet_card","last_synced_at":"2025-07-21T16:08:29.276Z","repository":{"id":56830483,"uuid":"375669240","full_name":"WebEferen/flutter_wallet_card","owner":"WebEferen","description":"Flutter Wallet Card plugin (iOS \u0026 Android)","archived":false,"fork":false,"pushed_at":"2025-07-18T18:02:11.000Z","size":282,"stargazers_count":12,"open_issues_count":7,"forks_count":32,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-18T18:02:13.311Z","etag":null,"topics":["apple","card","dart","flutter","google","ios","pass","wallet"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebEferen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-10T11:10:02.000Z","updated_at":"2025-07-18T13:45:44.000Z","dependencies_parsed_at":"2022-09-02T05:51:33.782Z","dependency_job_id":"2df48d7e-a4c4-4ec6-b6ea-8b4eb4ccc163","html_url":"https://github.com/WebEferen/flutter_wallet_card","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/WebEferen/flutter_wallet_card","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebEferen%2Fflutter_wallet_card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebEferen%2Fflutter_wallet_card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebEferen%2Fflutter_wallet_card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebEferen%2Fflutter_wallet_card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebEferen","download_url":"https://codeload.github.com/WebEferen/flutter_wallet_card/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebEferen%2Fflutter_wallet_card/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266332630,"owners_count":23912663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","card","dart","flutter","google","ios","pass","wallet"],"created_at":"2025-07-21T16:08:28.601Z","updated_at":"2025-07-21T16:08:29.266Z","avatar_url":"https://github.com/WebEferen.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Wallet Card\n\n[![pub package](https://img.shields.io/pub/v/flutter_wallet_card.svg)](https://pub.dartlang.org/packages/flutter_wallet_card)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA 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.\n\n## Features\n\n### Cross-Platform Support\n- **iOS**: Full Apple Wallet (Passkit) integration\n- **Android**: Google Wallet integration\n- **Unified API**: Single codebase for both platforms\n\n### Card Operations\n- ✅ Check wallet availability\n- ✅ Add cards to wallet\n- ✅ Check if card is already added\n- ✅ View cards in wallet\n- ✅ Generate card files from data\n- ✅ Parse existing card files\n- ✅ Download cards from URLs\n\n### Card Types Supported\n- **Generic Cards**: General purpose cards\n- **Boarding Passes**: Flight tickets\n- **Coupons**: Discount and promotional cards\n- **Event Tickets**: Concert, sports, and event passes\n- **Store Cards**: Loyalty and membership cards\n\n### Advanced Features\n- 🎨 Custom colors and styling\n- 📍 Location-based relevance\n- 📅 Date-based relevance\n- 🔒 Secure certificate signing (iOS)\n- 🌐 Network download support\n- 🧪 Comprehensive test coverage\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter_wallet_card: ^4.0.0\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n## Platform Setup\n\n### iOS Setup\n\n1. **Enable Wallet capability** in your iOS project:\n   - Open `ios/Runner.xcworkspace` in Xcode\n   - Select your target → Signing \u0026 Capabilities\n   - Add \"Wallet\" capability\n\n2. **Configure your Apple Developer account**:\n   - Create a Pass Type ID in Apple Developer Console\n   - Generate certificates for pass signing\n\n### Android Setup\n\n1. **Add Google Wallet API** to your project:\n   - Enable Google Wallet API in Google Cloud Console\n   - Configure OAuth 2.0 credentials\n\n2. **Update Android manifest** (automatically handled by plugin):\n   ```xml\n   \u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n   \u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n   ```\n\n## Usage\n\n### Basic Example\n\n```dart\nimport 'package:flutter_wallet_card/flutter_wallet_card.dart';\nimport 'package:flutter_wallet_card/models/wallet_card.dart';\n\n// Check if wallet is available\nbool isAvailable = await FlutterWalletCard.isWalletAvailable();\n\nif (isAvailable) {\n  // Create a wallet card\n  final card = WalletCard(\n    id: 'my-card-123',\n    type: WalletCardType.generic,\n    platformData: {\n      // iOS specific data\n      'passTypeIdentifier': 'pass.com.yourcompany.yourpass',\n      'teamIdentifier': 'YOUR_TEAM_ID',\n      // Android specific data\n      'issuerId': 'your-issuer-id',\n      'classId': 'your-class-id',\n    },\n    metadata: WalletCardMetadata(\n      title: 'My Awesome Card',\n      description: 'This is a sample wallet card',\n      organizationName: 'Your Company',\n      serialNumber: 'CARD123',\n    ),\n    visuals: WalletCardVisuals(\n      backgroundColor: '#1E88E5',\n      foregroundColor: '#FFFFFF',\n      labelColor: '#E3F2FD',\n    ),\n  );\n\n  // Add card to wallet\n  bool success = await FlutterWalletCard.addToWallet(card);\n  \n  if (success) {\n    print('Card added successfully!');\n  }\n}\n```\n\n### Advanced Usage\n\n#### Creating Cards with Locations\n\n```dart\nfinal cardWithLocation = WalletCard(\n  id: 'location-card',\n  type: WalletCardType.storeCard,\n  platformData: {\n    'passTypeIdentifier': 'pass.com.yourcompany.store',\n    'teamIdentifier': 'YOUR_TEAM_ID',\n  },\n  metadata: WalletCardMetadata(\n    title: 'Store Loyalty Card',\n    description: 'Get rewards at our store',\n    organizationName: 'Your Store',\n    locations: [\n      WalletCardLocation(\n        latitude: 37.7749,\n        longitude: -122.4194,\n        altitude: 100.0,\n        relevantText: 'Welcome to our San Francisco store!',\n      ),\n    ],\n  ),\n  visuals: WalletCardVisuals(\n    backgroundColor: '#4CAF50',\n    foregroundColor: '#FFFFFF',\n  ),\n);\n```\n\n#### Generating Card Files\n\n```dart\n// Generate a card file for sharing or storage\nFile cardFile = await FlutterWalletCard.generateCardFile(\n  card,\n  outputDirectory: await getApplicationDocumentsDirectory(),\n);\n\nprint('Card file created at: ${cardFile.path}');\n```\n\n#### Downloading Cards from URLs\n\n```dart\n// Download and add a card from a URL\ntry {\n  File downloadedCard = await FlutterWalletCard.downloadFromUrl(\n    'https://example.com/mycard.pkpass',\n  );\n  \n  // Parse the downloaded card\n  WalletCard card = await FlutterWalletCard.parseFromFile(downloadedCard.path);\n  \n  // Add to wallet\n  await FlutterWalletCard.addToWallet(card);\n} catch (e) {\n  print('Failed to download card: $e');\n}\n```\n\n#### Platform-Specific Features\n\n```dart\n// iOS: Add multiple cards at once\nif (Platform.isIOS) {\n  List\u003cWalletCard\u003e cards = [card1, card2, card3];\n  bool success = await FlutterWalletCard.addMultipleToWallet(cards);\n}\n\n// Android: Save pass with JWT\nif (Platform.isAndroid) {\n  String jwt = 'your-google-wallet-jwt';\n  bool success = await FlutterWalletCard.savePassWithJwt(jwt);\n  \n  // Create a pass link\n  String link = await FlutterWalletCard.createPassLink({\n    'objectId': 'your-object-id',\n  });\n}\n```\n\n## API Reference\n\n### Core Methods\n\n| Method | Description | Returns |\n|--------|-------------|----------|\n| `isWalletAvailable()` | Check if wallet is available on device | `Future\u003cbool\u003e` |\n| `isCardAdded(String cardId)` | Check if specific card is added | `Future\u003cbool\u003e` |\n| `addToWallet(WalletCard card)` | Add card to wallet | `Future\u003cbool\u003e` |\n| `viewInWallet(String cardId)` | Open card in wallet app | `Future\u003cbool\u003e` |\n| `generateCardFile(WalletCard card)` | Generate card file | `Future\u003cFile\u003e` |\n| `parseFromFile(String path)` | Parse card from file | `Future\u003cWalletCard\u003e` |\n| `downloadFromUrl(String url)` | Download card from URL | `Future\u003cFile\u003e` |\n\n### iOS-Specific Methods\n\n| Method | Description | Returns |\n|--------|-------------|----------|\n| `addMultipleToWallet(List\u003cWalletCard\u003e cards)` | Add multiple cards | `Future\u003cbool\u003e` |\n\n### Android-Specific Methods\n\n| Method | Description | Returns |\n|--------|-------------|----------|\n| `savePassWithJwt(String jwt)` | Save pass using JWT | `Future\u003cbool\u003e` |\n| `createPassLink(Map\u003cString, dynamic\u003e data)` | Create pass link | `Future\u003cString\u003e` |\n\n## Models\n\n### WalletCard\n\nThe main model representing a wallet card:\n\n```dart\nclass WalletCard {\n  final String id;\n  final WalletCardType type;\n  final Map\u003cString, dynamic\u003e platformData;\n  final WalletCardMetadata metadata;\n  final WalletCardVisuals visuals;\n  final File? file;\n}\n```\n\n### WalletCardMetadata\n\nCard information and content:\n\n```dart\nclass WalletCardMetadata {\n  final String title;\n  final String description;\n  final String? organizationName;\n  final String? serialNumber;\n  final DateTime? expirationDate;\n  final DateTime? relevantDate;\n  final List\u003cWalletCardLocation\u003e? locations;\n  final Map\u003cString, dynamic\u003e? additionalData;\n}\n```\n\n### WalletCardVisuals\n\nCard appearance and styling:\n\n```dart\nclass WalletCardVisuals {\n  final String backgroundColor;\n  final String foregroundColor;\n  final String? labelColor;\n  final Map\u003cString, dynamic\u003e? additionalStyles;\n}\n```\n\n## Error Handling\n\nThe plugin throws `WalletException` for wallet-related errors:\n\n```dart\ntry {\n  await FlutterWalletCard.addToWallet(card);\n} on WalletException catch (e) {\n  print('Wallet error: ${e.message}');\n  if (e.details != null) {\n    print('Details: ${e.details}');\n  }\n} catch (e) {\n  print('General error: $e');\n}\n```\n\n## Testing\n\nRun the test suite:\n\n```bash\nflutter test\n```\n\nFor comprehensive testing:\n\n```bash\nflutter test test/test_all.dart\n```\n\n## Migration from v3.x\n\nIf you're upgrading from version 3.x, here are the key changes:\n\n### Breaking Changes\n\n1. **New unified API**: Replace platform-specific calls with unified methods\n2. **Updated models**: Use new `WalletCard` model instead of separate iOS/Android models\n3. **Method names**: Some method names have changed for consistency\n\n### Migration Example\n\n**Old (v3.x):**\n```dart\n// iOS\nawait FlutterWalletCard.addPasskit(passData);\n\n// Android\nawait FlutterWalletCard.addGoogleWallet(walletData);\n```\n\n**New (v4.x):**\n```dart\n// Unified\nfinal card = WalletCard(/* ... */);\nawait FlutterWalletCard.addToWallet(card);\n```\n\n\n\n### Development Resources\n- [GitHub Actions Workflows](.github/workflows/README.md) - CI/CD and automation\n- [Publishing Scripts](scripts/README.md) - Package publishing tools\n\n## 🚀 Development \u0026 Deployment\n\n### Local Development\n\n```bash\n# Validate package before publishing\n./scripts/publish-package.sh validate\n\n# Run comprehensive tests\n./scripts/publish-package.sh test\n```\n\n### Publishing\n\n```bash\n# Create a new release\n./scripts/publish-package.sh release --version 1.0.0\n\n# Publish to pub.dev (manual)\n./scripts/publish-package.sh publish\n```\n\n### Automated Workflows\n\nThis project includes comprehensive GitHub Actions workflows:\n\n- **CI/CD Pipeline** - Automated testing, validation, and quality checks\n\n- **Package Publishing** - Automated pub.dev releases\n- **Release Management** - Version bumping and changelog generation\n\nSee [GitHub Actions Documentation](.github/workflows/README.md) for details.\n\n## Contributing\n\nContributions are welcome! Please read our [contributing guidelines](CONTRIBUTING.md) before submitting PRs.\n\n### Development Setup\n\n1. Fork the repository\n2. Clone your fork: `git clone https://github.com/your-username/flutter_wallet_card.git`\n3. Install dependencies: `flutter pub get`\n4. Run tests: `flutter test`\n5. Start documentation server: `./scripts/deploy-docs.sh dev`\n\n### Before Submitting\n\n- Run `./scripts/publish-package.sh validate` to ensure quality\n- Update documentation if needed\n- Add tests for new features\n- Follow existing code style\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- 📧 Email: [michal.makowski97@gmail.com](mailto:michal.makowski97@gmail.com)\n- 🐛 Issues: [GitHub Issues](https://github.com/WebEferen/flutter_wallet_card/issues)\n- 💬 Discussions: [GitHub Discussions](https://github.com/WebEferen/flutter_wallet_card/discussions)\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a detailed list of changes.\n\n---\n\n**Made with ❤️ for the Flutter community**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebeferen%2Fflutter_wallet_card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebeferen%2Fflutter_wallet_card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebeferen%2Fflutter_wallet_card/lists"}