pass_flutter 1.1.1

  • Readme
  • Changelog
  • Installing
  • 72

Apple Wallet logo

Flutter GitHub Actions Pub Package

pass-flutter #

A Flutter library for work with Apple Wallet passes.

How use it #

Getting pass from URL to internal memory #

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 #

import 'package:pass_flutter/pass_flutter.dart';

List<PassFile> passes = await Pass().getAllSaved();

Fetch preview from url and save it #

import 'package:pass_flutter/pass_flutter.dart';

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

or delete it

import 'package:pass_flutter/pass_flutter.dart';

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

Delete pass file from internal memory #

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);



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.

1.1.1 - 15.04.2020 #

  • Update after release 1.1.0

1.1.0 - 14.04.2020 #

  • BREAKING: change method fetchPreviewFromUrl return type PreviewPassFile -> PassFile
  • BREAKING: remove PreviewPassFile
  • BREAKING: params name in methods fetchPreviewFromUrl and saveFromUrl changed urlToPass -> url
  • Now PassFile include method for saving it toNow PassFile includes a method for saving it in the internal memory
  • Refactoring and optimisation

1.0.4 - 07.04.2020 #

  • Now all colors value in pass.json converted from CSS-style RGB triple to Color

1.0.3 - 03.04.2020 #

  • BREAKING: change method name getFromUrl -> saveFromUrl and url now passes in urlToPass
  • add method fetchPreviewFromUrl for get preview from url
  • add method for save preview to app internal memory and deleting from temp directory
  • add documentation for all public api members
  • add delete method for deleting current pass file to class PassFile and PreviewPassFile
  • update return in Pass.delete method, after deleting now return list of saved pass files
  • enable stricter type checks
  • refactoring and optimization

1.0.2 - 28.03.2020 #

  • fix bug with maxDistance and relevantDate in pass json
  • fix bug with auxiliaryFields, primaryFields, transitType
  • add equatable for comparisons pass.json data
  • add documentation for Fields

1.0.1 - 13.03.2020 #

  • fix code format
  • add altitude to Location Dictionary Keys
  • add maxDistance to Relevance Keys
  • add documentation to Location Dictionary Keys model
  • add documentation to Barcode Dictionary Keys model
  • add documentation to Pass Structure Dictionary model
  • add documentation for Pass Json

1.0.0 - 13.03.2020 #

  • initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pass_flutter: ^1.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pass_flutter/pass_flutter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on May 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.1
  • pana: 0.13.8-dev
  • Flutter: 1.17.0

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and pass_flutter.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
archive ^2.0.11 2.0.13
dio ^3.0.9 3.0.9
equatable ^1.1.1 1.1.1
flutter 0.0.0
json_annotation ^3.0.1 3.0.1
path ^1.6.4 1.7.0
path_provider ^1.6.5 1.6.9
uuid ^2.0.4 2.0.4
Transitive dependencies
args 1.6.0
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.5
http_parser 3.1.4
meta 1.1.8
path_provider_macos 0.0.4+3
path_provider_platform_interface 1.0.2
platform 2.2.1
plugin_platform_interface 1.0.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
build_runner ^1.8.1
json_serializable ^3.3.0