The plugin path_provider_extention uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
getPdfFiles() async {
List<StorageInfo> storageInfo = await PathProviderEx.getStorageInfo();
var root = storageInfo[0].rootDir;
var fm = FileManager(root: Directory(root)); //
files = await fm.filesTree(
excludedPaths: ["/storage/emulated/0/Android"], extensions: ["pdf"]);