save method

Future<void> save()

Saves a PKPass, showing a modal preview of the pass.

Throws a PlatformWalletException on error.

Implementation

Future<void> save() async {
  final result = await methodChannel.invokeMethod<String?>("addPkPass", data);
  if (result == null) {
    return;
  }
  if (result.startsWith("{")) {
    throw PlatformWalletException.fromJson(jsonDecode(result));
  }
}