createSimplePasswordProvider function
Create PdfPasswordProvider that returns the password only once.
The returned PdfPasswordProvider returns the password only once and returns null afterwards.
If password is null, the returned PdfPasswordProvider returns null always.
Implementation
PdfPasswordProvider createSimplePasswordProvider(String? password) {
return () {
final ret = password;
password = null;
return ret;
};
}