trash method
Implementation
Future<bool> trash(String id) async {
if(!await ready()) return false;
try{
return (await api!.files.update(File(trashed: true), id)).trashed ?? false;
}catch(e, stack){
if(e is PlatformException && e.code == "network_error"){
return false;
}
if(kDebugMode){
print("trash:");
print("${e.toString()}\n${stack.toString()}");
}else if (onError != null){
onError!(e, stack);
}
return false;
}
}