loadPkpassFileAsBase64 static method
Reads a PKPass file from the local filesystem at the given path
and returns its contents encoded as a base64 string.
The path
parameter is the full file path to the PKPass file.
Returns a Future that completes with the base64-encoded string, which can be used, for example, to pass the data to a plugin.
Throws an IOException if the file is not found or cannot be read.
Implementation
static Future<String> loadPkpassFileAsBase64({required String path}) async {
final bytes = await File(path).readAsBytes();
return base64Encode(bytes);
}