getFilesPath method
Equivalent to DocumentsContract.buildDocumentUriUsingTree
and
here it decode URI's to full Path
Implementation
Future<List<String>?> getFilesPath({String fileType = "any"}) async {
try {
const kGetFilesPath = "buildChildDocumentsPathUsingTree";
const kFileType = "fileType";
const kSourceTreeUriString = "sourceTreeUriString";
var sourceTreeUriString = _uriString;
final args = <String, dynamic>{
kFileType: fileType,
kSourceTreeUriString: sourceTreeUriString,
};
final paths = await kDocumentsContractChannel
.invokeMethod<List<dynamic>?>(kGetFilesPath, args);
if (paths == null) return null;
return List<String>.from(paths);
} catch (e) {
return null;
}
}