unTrash method

Future<bool> unTrash(
  1. String id
)

Implementation

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