isEncrypted method

  1. @override
Future<bool> isEncrypted({
  1. required String filePath,
})
override

pdf is encrypted or not filePath: pdf file path return: is encrypted

Implementation

@override
Future<bool> isEncrypted({required String filePath}) async {
  try {
    final bool result = await methodChannel.invokeMethod('isEncrypted', {
      'filePath': filePath,
    });
    return result;
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print("Failed to check if PDF is encrypted: '${e.message}'.");
    }
    rethrow;
  }
}