Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexey-nobody/pass-flutter

Simple Flutter package for work with Apple Wallet passes.
https://github.com/alexey-nobody/pass-flutter

dart dartlang flutter flutter-package flutter-plugin

Last synced: 2 months ago
JSON representation

Simple Flutter package for work with Apple Wallet passes.

Awesome Lists containing this project

README

        

Apple Wallet logo

![Flutter GitHub Actions](https://github.com/alexeynobody/pass-flutter/workflows/Flutter%20GitHub%20Actions/badge.svg)
[![Pub Package](https://img.shields.io/pub/v/pass_flutter.svg)](https://pub.dartlang.org/packages/pass_flutter)

# pass-flutter
A Flutter library for work with Apple Wallet passes.

## How use it

### Getting pass from URL to internal memory
```dart
import 'package:pass_flutter/pass_flutter.dart';

PassFile passFile = await Pass().saveFromUrl(url: 'https://link_to_pass/pass.pkpass');
```

### Getting list of all saved passes
```dart
import 'package:pass_flutter/pass_flutter.dart';

List passes = await Pass().getAllSaved();
```

### Fetch preview from url and save it
```dart
import 'package:pass_flutter/pass_flutter.dart';

PassFile passFile = await Pass().fetchPreviewFromUrl(url: 'https://link_to_pass/pass.pkpass');
passFile.save();
```

or delete it
```dart
import 'package:pass_flutter/pass_flutter.dart';

PassFile passFile = await Pass().fetchPreviewFromUrl(url: 'https://link_to_pass/pass.pkpass');
passFile.delete();
```

### Delete pass file from internal memory
```dart
import 'package:pass_flutter/pass_flutter.dart';

Pass pass = Pass();
PassFile passFile = await pass.saveFromUrl(url: 'https://link_to_pass/pass.pkpass');
await pass.delete(passFile);
```

OR

```dart
passFile.delete();
```

## Contribute

Please feel free to fork, improve, make pull requests or fill issues.
I'll be glad to fix bugs you encountered or improve the extension.

## Changelog

Refer to the [Changelog](https://github.com/alexeynobody/pass-flutter/blob/master/CHANGELOG.md) to get all release notes.