writePDF method
Future<File?>
writePDF(
- String path,
- String fileName,
- bool overwrite,
- PDFPageFormat pdfPageFormat,
override
Implementation
@override
Future<File?> writePDF(String path, String fileName, bool overwrite,
PDFPageFormat pdfPageFormat) async {
String? returnPath = await methodChannel.invokeMethod<String>('writePDF', {
'path': path,
'fileName': fileName,
'overwrite': overwrite,
'pdfPageFormat': pdfPageFormat.index
});
if (returnPath != null) {
return Future<File?>.value(File(returnPath));
} else {
return Future<File?>.value(null);
}
}