listBuckets method

Future<List<Bucket>> listBuckets()
inherited

Retrieves the details of all Storage buckets within an existing project.

Implementation

Future<List<Bucket>> listBuckets() async {
  final FetchOptions options = FetchOptions(headers: headers);
  final response = await storageFetch.get('$url/bucket', options: options);
  final buckets = List<Bucket>.from(
    (response as List).map(
      (value) => Bucket.fromJson(value),
    ),
  );
  return buckets;
}