deleteBucket method

Future<String> deleteBucket(
  1. String id
)
inherited

Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first clear the bucket using emptyBucket.

id is the unique identifier of the bucket you would like to delete.

Implementation

Future<String> deleteBucket(String id) async {
  final FetchOptions options = FetchOptions(headers: headers);
  final response = await storageFetch.delete(
    '$url/bucket/$id',
    {},
    options: options,
  );
  return (response as Map<String, dynamic>)['message'] as String;
}