listFiles method
Implementation
Future<List<File>?> listFiles(String folder) async {
if(!await ready()) return null;
try{
var foldID = await getID(folder, mimeType: DriveQueryBuilder.folderMime);
if(foldID == null) return null;
return (await api!.files.list(
spaces: (scope == DriveApi.driveAppdataScope) ? "appDataFolder" : "drive",
q: "'$foldID' in parents"
)).files;
}catch(e, stack){
if(e is PlatformException && e.code == "network_error"){
return null;
}
if(kDebugMode){
print("listFiles:");
print("${e.toString()}\n${stack.toString()}");
}else if (onError != null){
onError!(e, stack);
}
return null;
}
}