openPdf method

  1. @override
Future<String?> openPdf({
  1. required String filePath,
  2. required String password,
})
override

Implementation

@override
Future<String?> openPdf({
  required String filePath,
  required String password,
}) async {
  try {
    final String? decryptedFilePath = await methodChannel.invokeMethod(
      'openPdf',
      {'filePath': filePath, 'password': password},
    );
    return decryptedFilePath;
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print("Failed to open PDF: '${e.message}'.");
    }
    rethrow;
  }
}