getContents method
Implementation
Future<Media?> getContents(String id) async {
if(!await ready()) return null;
try{
return (await api!.files.get(id, downloadOptions: DownloadOptions.fullMedia)) as Media;
}catch(e, stack){
if(e is PlatformException && e.code == "network_error"){
return null;
}
if(kDebugMode){
print("getContents:");
print("${e.toString()}\n${stack.toString()}");
}else if (onError != null){
onError!(e, stack);
}
return null;
}
}