updateBucket method Null safety
- String id,
- BucketOptions bucketOptions
inherited
Updates a new Storage bucket
id
is a unique identifier for the bucket you are creating.
bucketOptions
is a parameter to set the publicity of the bucket.
Implementation
Future<String> updateBucket(
String id,
BucketOptions bucketOptions,
) async {
final FetchOptions options = FetchOptions(headers: headers);
final response = await storageFetch.put(
'$url/bucket/$id',
{'id': id, 'name': id, 'public': bucketOptions.public},
options: options,
);
final message = (response as Map<String, dynamic>)['message'] as String;
return message;
}