isPDF static method
Determines whether the given file path corresponds to a PDF file.
This method checks if the file path ends with the .pdf
extension
(case insensitive).
Implementation
static Future<bool> isPDF(String filePath) async {
try {
return await FileMagicNumber.detectFileTypeFromPathOrBlob(filePath) ==
FileMagicNumberType.pdf;
} catch (e) {
return false;
}
}