deleteBucket()

Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first empty() the bucket.

1final String result = await supabase
2  .storage
3  .deleteBucket('avatars');

Notes#

  • Policy permissions required:
    • buckets permissions: select and delete
    • objects permissions: none

Examples#

Delete bucket#

1final String result = await supabase
2  .storage
3  .deleteBucket('avatars');