lock method

  1. @override
Future<void> lock({
  1. required String filePath,
  2. required String userPassword,
  3. required String ownerPassword,
})
override

lock pdf filePath: pdf file path userPassword: pdf user password ownerPassword: pdf owner password return: lock result

Implementation

@override
Future<void> lock({required String filePath, required String userPassword, required String ownerPassword}) async {
  try {
    await methodChannel.invokeMethod('lock', {
      'filePath': filePath,
      'userPassword': userPassword,
      'ownerPassword': ownerPassword,
    });
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print("Failed to lock PDF: '${e.message}'.");
    }
    rethrow;
  }
}