restoreItem method

Future<void> restoreItem(
  1. String uuid,
  2. String type
)

Implementation

Future<void> restoreItem(String uuid, String type) async {
  final endpoint = type == 'folder' ? '/v3/dir/restore' : '/v3/file/restore';
  await api.post(endpoint, {'uuid': uuid});
  if (baseFolderUUID.isNotEmpty) {
    cache.invalidate(baseFolderUUID);
  }
}