Skip to content

Commit

Permalink
Improve readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
ueman committed Jul 1, 2024
1 parent c5094a4 commit c375149
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
16 changes: 15 additions & 1 deletion apple_passkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

This is a Flutter binding for [Apple's PassKit](https://developer.apple.com/documentation/passkit).

This library allows you to add and and read `PkPass` files.
This library allows you to add `PkPass` files to the users' wallet.
It also allows you to read available `PkPass` files in your users' wallet.

Do you need to deal with `PkPass` files in your code, consider using
[`passkit`](https://pub.dev/packages/passkit) and [`passkit_ui`](https://pub.dev/packages/passkit_ui) instead. Those do not depend on iOS/macOS and are mostly cross-platform.

## How to use it

Expand All @@ -36,3 +40,13 @@ To view all methods, take a look at the [API docs](https://pub.dev/documentation
Setup your Xcode project as described in the [documentation](https://help.apple.com/xcode/mac/current/#/devfc3f493bb).

After that, use `await ApplePassKit().passes()` to load your installed passes.

## Contributors

Thanks a lot to all the awesome contributors:

<a href="https://github.com/ueman/passkit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ueman/passkit" />
</a>

Contribute to this library, and you'll show up too.
12 changes: 12 additions & 0 deletions passkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
PassKit allows you to work with Apple's PkPass files. This is a pure Dart library. No Flutter needed.

In order to show PassKit files in Flutter, use the [`passkit_ui`](https://pub.dev/packages/passkit_ui) package, which includes ready made widgets.

Want to work with Apple's PassKit APIs? Consider using [`apple_passkit`](https://pub.dev/packages/apple_passkit).

## How to read a PassKit file?
Expand Down Expand Up @@ -58,3 +60,13 @@ Feel free to submit PRs for them
## Bugs and parsing issues

If you hit an issue with parsing, please create an issue and attach the PkPass (if possible)

## Contributors

Thanks a lot to all the awesome contributors:

<a href="https://github.com/ueman/passkit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ueman/passkit" />
</a>

Contribute to this library, and you'll show up too.
40 changes: 37 additions & 3 deletions passkit_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,46 @@
> 🚧 API is subject to change! 🚧
> Not all pass types are yet supported. Not ready for production use.
Package with widgets to visualize `PkPass` files with the help of [`passkit`](https://pub.dev/packages/passkit).
This package contains widgets to visualize `PkPass` files with the help of [`passkit`](https://pub.dev/packages/passkit). `passkit` is a pure Dart package, which also works on servers.

This package does intentionally not support showing the "backside" of a `PkPass` file, since there are a lot of features that depend on the application logic.
This package does intentionally not support showing the "backside" of a `PkPass` file, since there are a lot of features that depend on application logic.
Those include among other things: sharing a pass, deleting a pass, having the ability to open URLs, emails and phone numbers.

Want to work with Apple's PassKit APIs? Consider using [`apple_passkit`](https://pub.dev/packages/apple_passkit).

## How to use it?

Add the `passkit` and `passkit_ui` packages to your `pubspec.yaml` file

```yaml
dependencies:
passkit: any # Use the latest available version
passkit_ui: any # Use the latest available version
```
Use it in your code:
```dart
import 'package:passkit/passkit.dart';
import 'package:passkit_ui/passkit_ui.dart';

// First load the PkPass file somewhere
final pkPass = await loadPass('assets/coupon.pkpass')

// Then in your widget, use the `PkPassWidget` and pass the PkPass to it
Center(child: PkPassWidget(pass: pkPass))
```
## Contributors
Thanks a lot to all the awesome contributors:
<a href="https://github.com/ueman/passkit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=ueman/passkit" />
</a>
Contribute to this library, and you'll show up too.
# Development related docs
Design docs:
Expand All @@ -40,4 +75,3 @@ The pass layout allots a certain area on the front of the pass for each image. I
- The thumbnail image (`thumbnail.png`) displayed next to the fields on the front of the pass. The allotted space is 90 x 90 points. The aspect ratio should be in the range of 2:3 to 3:2, otherwise the image is cropped.

> [!NOTE ]The dimensions given above are all in points. On a non-Retina display, each point equals exactly 1 pixel. On a Retina display, there are 2 or 3 pixels per point, depending on the device. To support all screen sizes and resolutions, provide the original, @2x, and @3x versions of your art.

0 comments on commit c375149

Please sign in to comment.