deleteFile method
Delete File
Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
Implementation
Future deleteFile({required String bucketId, required String fileId}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}