containsPass method
Returns a Boolean value that indicates whether the user’s pass library contains the specified pass.
This method lets you determine that the pass library contains a pass even though your app can’t read or modify the pass. For example, an email client doesn’t have entitlements to read or write any passes from the library.
Your app can use this method to provide a UI that indicates whether a pass is already in the library.
Implementation
Future<bool> containsPass(Uint8List pass) async {
if (pass.isEmpty) {
throw PkPassEmptyException();
}
return await wrapWithException(
methodChannel.invokeMethod<bool>('containsPass', [pass]),
) ??
false;
}