lock method
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;
}
}